mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
Improve style in many demos (#1263)
This commit is contained in:
@@ -45,10 +45,10 @@ func _ready() -> void:
|
||||
cycle_camera_type()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseMotion:
|
||||
_yaw -= event.screen_relative.x * MOUSE_SENSITIVITY * 0.001
|
||||
_pitch += event.screen_relative.y * MOUSE_SENSITIVITY * 0.002
|
||||
func _input(input_event: InputEvent) -> void:
|
||||
if input_event is InputEventMouseMotion:
|
||||
_yaw -= input_event.screen_relative.x * MOUSE_SENSITIVITY * 0.001
|
||||
_pitch += input_event.screen_relative.y * MOUSE_SENSITIVITY * 0.002
|
||||
_pitch = clamp(_pitch, -PI, PI)
|
||||
$Rig.rotation = Vector3(0, _yaw, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user