W,A,S,D control a cube on a grid and glide it from grid space to grid space. It’s done by leaping two locations with timeline.
I also have it set to continue moving if the player holds the event key down.
however, If I press another key while holding another key down it acts up. usually it just tries to do both movements.
I set a bool to stop other key inputs from working when another key input is held down.
HOWEVER! Now if i press another movement button while one is in action it just stops the present movement.
So if I’m correct it’s like Unreal is reading that i’m holding a button down…UNTILL I press another. It just stops and I have to start moving again…
Im very confused…can someone help me please?
dunno what you are trying to do, but the problem is in your setup and maybe the way you are doing it.
try the floating pawn movement component, this is the way you might want to go.
Can you explain to me what the floating pawn movement component is?
My setup is simple. W,A,S,D move a cube in the for directions on a plane. positive and negative on the x and y axis.
Each time the button is pressed the cube glides said direction one grid space.
If I hold said button it repeats untill the final action is complete. Moving the correct number of spaces.
BUT. If I press another movement key while I’m holding another it stops.
checkout this tutorial by me, its german but at 14 min 13 secs i show it
if my answer helped you, please mark it as correct answer as my acceptance rate is decreasing and decreasing with every answer when people not mark it as correct, which is very pity
I’m not sure what’s happening in this tutorial because there is no English im sorry.
Go to components inside your default pawn, search for “pawn floating” or just “floating”
Can you explain to me what that component is? i’m not familiar with it.
thank you!!
Can you just add a boolean called “Moving” and when you press a key it checks “Moving” to see if its true
If true = do nothing, if false, do next movement. that way it should only take one direction input at a time.
Do what @MrGrr suggested. I use a similar boolean flag to prevent a player from moving while they are attacking.
I tried this. When I’m HOLDING in another key it will stop that action when I touch another one regardless…It’s like Unreal Stops reading the one button is being held in. and just stops it.
If you want to go this way i guess you can use a gate and use that in your bp tick, just search for Input Tutorials on youtube how to do it exactly
I guess its exactly what you are looking for. Its a component for handling the user input received from the player controller when you subclass from pawn instead of character as the character movement comp has some extra functions and flags like maxwalkspeed and so on
Sorry for my bad english, need to improve it xP
Actually this helped a TON!! I watched the video again and could set up everything differently to better suit my needs. THANKS!!!