Files
HorrorGame/Assets/scripts/Head.gd

12 lines
351 B
GDScript

extends Node3D
@export var vertical_joystick_sensitity : float = 2
func _process(delta):
var look_velocity = Input.get_vector("look_left", "look_right", "look_up", "look_down")
rotate_x(-look_velocity.y * vertical_joystick_sensitity * delta)
func _unhandled_input(event):
if event is InputEventMouseMotion:
rotate_x(-event.relative.y * 0.02 )