Godot Version
4.6.3.stable
Question
I was following a FPS tutorial when I decided to add support for controllers. I am encountering difficulties with getting the camera movement to work.
My current implementation:
func _input(event: InputEvent):
_capture_joystick = event is InputEventJoypadMotion
outputs += 1
if _capture_joystick:
_look_input += Input.get_vector("stickRight", "stickLeft", "stickDown", "stickUp") * controller_senstivity
The outputs variable is used for print debugging in the process function. The _look_input variable is retrieved by my camera controller script for use there (and is reset to the zero vector by process).
When running the game, if I manage to hold the right stick all the way to the right and keep it perfectly still, the _input function wonāt be called as shown by the outputs value not increasing as it prints. This is a problem because moving the stick normally allows there to be moments when the stick is still for just a sec, causing really choppy looking around. The only time this doesnāt happen is when you constantly move the stick in some way, when you do that the looking around is really smooth.
I looked into this a bit, and it seems this part of the documentation is related to my issue:
Iām wondering if thereās a more elegant solution out there for this part of controller input than attempting this.