Change InputEventMouseMotion to InputEventJoypadMotion
Change event.relative.x and event.relative.y to axis_value
Change JOY_AXIS_0 and JOY_AXIS_1 to the ones you want to use
func mouse(event):
if event.axis == JOY_AXIS_0:
Yaw.setrotation(lookleftrightrotation(axis_value / -CAMERATURNSPEED))
if event.axis == JOY_AXIS_1:
self.setrotation(lookupdownrotation(axis_value / -CAMERATURNSPEED))
func _input(event):
if event is InputEventJoypadMotion:
return mouse(event)
if event.axis == JOY_AXIS_2:
Yaw.set_rotation(look_leftright_rotation(axis_value / -CAMERA_TURN_SPEED))
if event.axis == JOY_AXIS_3:
self.set_rotation(look_leftright_rotation(axis_value / -CAMERA_TURN_SPEED))
it just spins round weirdlt fast even without touching the sticks