How do i turn off wasd movement during a dash?

You could use a boolean to block regular movement code paths while dashing, and emulate as if user was pressing only forward.
Something like this :

This is better if you only want to block some movement capabilities (eg. wasd) while still allowing some other ones.

Alternatively if you want to really block all of them, a simpler solution is to simply ignore movement inputs temporarily. Tick bForce in the AddMovementInput node for sprinting, so it becomes the only one that is not ignored :

Alternatively, depending on the type of dash you want ot have, you can set up a custom movement mode to handle it. Similarly to how “Flying” and “Swimming” differ from “Walking”, your custom movement mode would implement movement in its own way. But that is a more complex topic. This thread has a bunch of links you may want to look into.

1 Like