Rotate on Keyboard Movement

Hey there. So I’ve setup a player character (a plane) to move left or right with the A and D keys, but as well as translation, I’d like the plane to rotate (bank).

The part I’m having issues with is having it rotate when I hold the A key, but rotate only once, not continuously. Basically when I hit A, I want it to translate to the left continuously, and rotate 5 degrees ONCE, while continuing to move while the button is pressed. Then when I stop pressing the button, it rotates back -5 degrees ONCE, and stops trabslating. Attached is my blueprint so far (which does the translation part successfully).

Anyone have suggestions on how to do the rotation part?

rotate

  • Neil

roll

1 Like

Thanks ClockworkOcean! That was actually more complex than I needed (since I wanted it to snap to 5 degrees instead of continuously flow to 5 degrees), but it gave me the ideas and nodes I needed to role my own. Here’s what I ended up with. Thanks again!

  • Neil
1 Like

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