Rotate an actor by key press

Hello,

I am trying to rotate an actor by presing a key ("E) in my case. The idea is that I want to rotate it for 45degrees every time I press the key (left or right).
How the blueprint is now, it allows me to rotate only once for 45 degree. I want to be possible to rotate it 8 times (45 x 8 = 360degree, left or right).

Would you please let me know what do I need to add to my blueprint to make it so?

Thanks in advance!

When working with Timelines, it’s super useful to store the initial values first. This way you avoid interpolating twice since you’re sampling the rotation during the Timeline’s update:

Image from Gyazo

Thank you for your answer!

I’m gonna try it out and see how it goes!

Thank you again. It works perfectly, and I like the conidition you add there to not be able to spam :slight_smile: the action.
To continue this, I would like to limit the rotation to 4 times on both ways (for this case). Is there any script that can do this?

Cheers!

The easiest ways being usually the best, I’d probably just count the turns:

https://ez-pass.info/
https://myvanilladebitcard.site/

Awesome like before!
Thx a lot again.
I see that this kind of things looks pretty easy for someone who knows…still a long way for me there! But I’m getting better :).

Cheers!