FQuat instead of FRotator? (code doesn't work)

I’m trying to rotate an object using AddActorWorldRotation, which in blueprints works fine. But when i use it in code it takes a FQuat instead of the old FRotator now for some reason which is fine but my code bugs-out and i have no idea why?

In my code, instead of rotating the actor 5 degrees like i set it to, it rotates 180 degrees if the value is higher than 1 but if lower it doesn’t rotate at all.

here is blueprint:

Here is code:



I fixed my issue thanks to help on the forums, i used an FRotator and converted it to FQuat like so…

Actor->AddActorWorldRotation(FRotator(0.f, 5.f, 0.f).Quaternion());
1 Like