Rotate instantly instead of slowly

hi,

currently my character can run left and right but i want to remove this slow turn it’s currently doing so facing left or right on input ‘A’ or ‘D’ is instant rather than a slow turn, not sure how to do this, I’ve tried numerous google results

demonstration

input mappings for left and right

You can simply set the actor rotation to the opposite value (either manually or by negating the current rotation on Z axis) when the direction of movement changes :innocent:

this works but i don’t feel it’s the ‘best’ way to do this?

Like I said, you don’t need to reset the value if it’s already gonna be the same. You can just switch it to be the opposite when the direction of the movement changes.

(I’m not saying that you should constantly check this after Event Tick btw, do that after each input action as well)

1 Like

this helped me get to a solution thank you!

what i did was because i have 4 input control mappings, each time the character moves to another side of the square, i change input mappings so ‘A’ and ‘D’ move towards the right direction, at the end of each input mapping change i set it to a variable, so depending on the current input mapping, it would change the actor rotation for the input like you said

camera updates that enable/disable bools

logic for choosing rotation based on input mapping

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.