godot-third-person-basic-scene/player/camera.gd
2022-02-03 00:01:07 +01:00

17 lines
568 B
GDScript

extends Node3D
#var starting_point = Vector2(DisplayServer.window_get_size().x / 2, DisplayServer.window_get_size().y / 2)
#
#func _ready():
## Place the mouse at the center of the screen
# get_viewport().warp_mouse(starting_point)
#
#
#func _input(event):
# # If right mouse button is pressed and mouse moves, pan horizontally camera
# # and rotate vertically
# if Input.is_mouse_button_pressed( 2 ):
# if event is InputEventMouseMotion:
# $horizontal_root.rotate_y( event.relative.x *0.01 )
# $horizontal_root/vertical_root.rotate_x( event.relative.y * 0.01 )