How to get actor to rotate gradually back to initial rotation after key unpressed

I have a ship that rotates on the y axis either positive or negative when I press forward or back. I want it to gradually rotate back to 0 after the key is released. I have a Rinterp To node in there now but it doesn’t seem to be working.

Can someone tell me what I’m doing wrong?


2 Likes

Replace your D graph with this

Rinterp, as most interpolations will require event tick, thats why they have an input that requires delta seconds, if you want to avoid event tick, and you should, you can use a Timeline

So I created that and it still is not working.

1 Like

Can you show me the code now? ( you still need to use your axis code… )

( You might need to use a lower interp speed, or raise your axis variables a bit… )

yes here is my complete code now. Thank you.

Are we rotating the whole actor, or just the ship, I’m not clear…

This is the ship BP, I just want to rotate the ship.

If I use release key and setworldrotation it snaps the rotation back to where I want after the key is unpressed but I’d like it to be gradual.

Yes, it’s because you need to do it on tick, like in my example… :slight_smile:

Try it like this

after that I give up :wink:

that worked, thank you!

1 Like

:smiley:

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