I used Input.get_vector(“ui_left”, “ui_right”, “ui_up”, “ui_down”) in the _process function to calculate a movement vector. There are two issues. The first is that for example, when I hold the right button, it doesn’t seem to register at every frame. Sometimes the movement vector is just (0,0). The second issue is that I can’t move diagonally. The vector is either (1,0) or (0,1), never allowing diagonal movement. I feel like I’m going crazy because I don’t know what I’m doing wrong, like this is such basic stuff.
You should show your movement code here so everybody can easily see what the situation is.
I’ve checked and it’s the movement vector that’s wrong, so it doesn’t matter how I actually apply the movement. I’m printing the value of the vector and it says (0,1) when I’m holding down right and up at the same time, or (1,0), depending on which button I started holding more recently. This never happened to anyone else? Again, this is basic stuff and I feel the engine is failing me. I don’t think I’m doing anything wrong here.
Check that it’s not a keyboard rollover issue here Online Key Rollover Test - Mechanical Keyboard If it’s is one then it’s a hardware issue and Godot can’t do anything to fix that.
I tried on two different computers, I don’t think it’s a hardware issue
how did you check the vector
I used print_debug
func _process(delta):
print_debug(Input.get_vector("ui_left","ui_right","ui_up","ui_down"))
this line of code works fine
It is really hard to find out what went wrong when we can’t see your script
It’s basically this, there’s nothing else to it. I did this and it’s not working properly.