The idea is to make my character slide with limited lateral movement just like Reinhardt charge, but I’m still a noob in UE and I don’t know how to limit the movement to “the character charge in the direction he was facing when the dash was activated, then can’t turn left/right (or at least, very slowly)”
Hello! I think you will want to have a different movement mode when you activate your charge.
Whenever you press your charge button, you can set a new bool in the player or controller (wherever your movement is setup probably). We can call it IsCharging
. While IsCharging
is true, you can have a check in the places you are reading your player’s inputs for moving left and right and you can either stop all movement going left and right or lower the value it takes to move as well for limited movement.
This way, when you are done charging and your IsCharging
variable is set back to false, you should have your full range of movement for going left and right again.
Hope this helps get you on the right track with it!
yes that’s the plan, but how don’t know where in the bluprints I must reduce player’s mobility, I tried by divide the right vector before the movement input but that doesn’t work.