So, I am beginner in Unreal Engine 4. I am having trouble understanding "Make Rotator" and "Break Rotator" on Movement Input of the character blueprint class. The original definition UE4 documentation has made me even more confused. Can anyone explain this in a simple way?
A FRotator
(or just Rotator
in BP) is Unreal's way of storing rotations.
Usually, there are two main ways rotations are represented in programs:
Unreal internally uses quaternions (FQuat
), but they're a bit harder to explain and understand, than just three X Y Z rotations. Because of that, FQuat
is only for C++, and on the Blueprint level the editor simply shows the rotation as three axis. That's what the Rotator
is for.
When you break
a rotator, you just separate out the three float values for the XYZ rotations. When you make
a rotator out of three float values, it makes the rotation that would result from them.
These break
and make
nodes exist for many other types, like FVector
(shown in BP as just Vector), FLinearColor (Linear Color), to easily make a more complicated thing, like a color or rotation, out of simple float
values.
Having said this, since the Rotator
really represents an axis and angle, it's better not to use the make Rotator
node, but the rotator from axis and angle
node.
Rotators are quite convenient, because there are many functions in Unreal to work with them, such as Lerp (Rotator)
and others.