might need to manually define a deadzone?
Input.get_vector() allows for a 5th argument for the deadzone on the range of 0 to 1
So maybe try:
var input_dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down", 0.2)
Try adjusting that "0.2" up and down to experiment.
HOWEVER! From what I've read, "Input.get_vector()" apparently uses a circular deadzone, so if you are testing with a controller you may have some slight stick-drift going on, resulting in non-perfect up/down movement.
What you might want to do instead is utilise "Input.get_axis", which from what i read provides separate deadzones for each axis (which helps with drift).
So try replacing:
var input_dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
With:
var input_dir = Vector2(Input.get_axis("ui_left", "ui_right"), Input.get_axis("ui_up", "ui_down"))
Give that a try and let me know how you go! (it might take me a while to get back to you)
Oh! Haha!
Didn't even realise this post was that old!
Glad you managed to figure it out, hope your project is coming along/came along well!
might need to manually define a deadzone?
Input.get_vector() allows for a 5th argument for the deadzone on the range of 0 to 1
So maybe try:
var input_dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down", 0.2)Try adjusting that "0.2" up and down to experiment.
HOWEVER! From what I've read, "Input.get_vector()" apparently uses a circular deadzone, so if you are testing with a controller you may have some slight stick-drift going on, resulting in non-perfect up/down movement.
What you might want to do instead is utilise "Input.get_axis", which from what i read provides separate deadzones for each axis (which helps with drift).
So try replacing:
var input_dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")With:
var input_dir = Vector2(Input.get_axis("ui_left", "ui_right"), Input.get_axis("ui_up", "ui_down"))Give that a try and let me know how you go! (it might take me a while to get back to you)
End of this list.
Back to top