how to create a smooth 90 degree rotation

Hi everyone :slight_smile:
i have a mesh that i want to rotate of 90 degrees if i enter a specific trigger and press ā€œEā€, that works just fine how it is BUT i would like to build in a smooth animation like transition between degree 0 and degree 90.

it would be great if someone could help me with that :slight_smile:

This can be done using slerp, an answer explaining how to do this can be found here: https://answers.unrealengine.com/questions/20243/slerp-rotation-in-blueprint.html

You can use a timeline to drive the smooth rotation of your actor. The below event graph is one way you could do it. The variable CanRotate controls whether the actor can rotate or not, and should be set to true/false outside of this event handler (in your case, in the begin/end overlap event handlers). The IsRotating variable is used to prevent starting a new rotation if the actor is already rotating. The StartingRotation variable is set prior to the rotation and used as a base for applying a relative yaw offset (this allows successive events to further rotate the actor). Finally, the key to all of this is the RotationTimeline, which in this case contains a vector track that outputs a Yaw value that transitions from 0 to 90 over the course of 2 seconds. The Update pin will fire on each frame tick, with the Yaw output pin providing a value between 0 and 90 interpolated according to the track in the timeline.

Hope this helps.