So, I’m trying to make a free camera movement like in RTS games or the sims, more specifically using pawn. And I’m having an issue with diagonal movement. I already manage to fix the speed problem people usually have, as both axis add up to each other, I devided the value by 2. The problem is that when pressing W + A, if for some reason you press D, the speed goes back on stacking up, and only by releasing both A and D it goes back down.
Now the cause most likely is because I’m using on Press and on Release for all movement keys with 2 booleans to set Foward/backward and Sideways movement on and off. I believe I could make one boolean for each key, but not sure if it is the best solution, as it seems to add unnecessary complexity to it. Also tried gates, but my dumb ■■■ can’t go past trial and error.
Honestly it is not that bad, but it is really anoying, specially when debuging with print string
Also, there is probabbly more than needed here, but this is all from me trying to fix this almost ramdomly by now.
And if it helps, here is the tutorial I was following
The GIF bellow shows a bit more cleary. The expected speed is 210, as the max is set to 420, It is possible to see that when pressing the oposite sideway key, the speed goes back up to 420 as soon as the key is released. It is visibly faster.
I only looked at the video after posting - it does the same thing, Perhaps you requirements are different. Is there a reason you want to use Action Input for this?
I used action imputs just to try to find a solution for this by telling the enging when it is going foward or sideways to try to block it from speeding. It actually worked, but then it made another issue as A and D are using the same boolean. It is a really specific situation, where if you are pressing W + A to go diagonally to the left, and for example decide to go diagonally right, if D key is slightly pressed before releasing A, the code assume the boolean is turned off, and the speed goes back up, only by releasing every movement key that the code goes back to work normaly. I added a GIF to the original post because I’m having a hard time explaining it xD. Also I tried to mess with the setings, but the problem continues, as max speed seems to work in every axis independent from direction.
I still do not understand why using Axis Input is a no go? If the only goal is to try to avoid exceeding speed, using movement input + axis is the way to do.
Are you trying to have different speeds for cardinal and ordinal direction?