How can I fix a Intertp that gets stuck midway rotation?

Hello! I’m trying to get a smooth random rotation of an object that floats in the space for each individual value (Roll, Pitch, Yaw).

The idea is to set 3 Arrays with 4 values each (0, 90, 180, 270) so it willrotate to those degrees for each axis individually.

I set a Random Integer to Get 1 of those value randomly. Join them in a RInterp as Target rotation, Set that as World Rotation for de Target and Condition them so set True If Current Value and the Target Value are the same Then the Array will get another Value as Target and loop that proces.

The are 2 problems with this blueprint

1 Midway the first Rotation the Current and the Target Value of RInterp meet at and average point and stuck the rotation
2. I have no idea, how to control the flow of the get value, one at a time.

EDIT: IT seems the problems is a Gimbal Lock, still working on it, I’ll edit If i manage to resolve this.

Here is a Image of my Blueprint

Maybe you should try to use the function:

AddWorldRotation(FRotator r);

With

r.X = Xrotation * DetaTime / TimeOfAnimation
r.Y = Yrotation * DetaTime / TimeOfAnimation
r.Z = Zrotation * DetaTime / TimeOfAnimation

Maybe you should try to use the
function: AddWorldRotation(FRotator
r); With

r.X = Xrotation * DetaTime / TimeOfAnimation
r.Y = Yrotation * DetaTime / TimeOfAnimation
r.Z = Zrotation * DetaTime / TimeOfAnimation

Thank you very much, you are amazing! It works now, also I didn’t notice the AddRotation was per frame, (I thought per tick means per second not per frame, I’m kinda new to BP) And with the recomendation I did some changes so here is the final result.

1 Like