I’m back again with questions on the subject of rotation (I wonder when I’ll get it :D)
How the heck does Combine Rotators work? I don’t get it. It only gets the information of two rotators, no position, nothing and still the output never adds up for my taste. If rotator A is (60,170,270) and B is (20,190,-15) i would consider the combination of the A and B to be either A+B (80,360/0,255/-90) or A+B/2 (40,180/0,127.5/-45) but this never seems to be the case… Why?
Same question for Delta (Rotator). I got the rotators A (64,-81,39) and B (64,161,-36) and the Delta node gave me (-2,0.06,117)…I know it somehow normalizes, but this still doesn’t work?
Hi, combine rotators does not simply add rotators together. It first applies A, then B. For example with no rotation your vector faces in the X-Axis.
If you now rotate it 90 degrees by yaw it will face in Y-Axis, then 90 degrees by pitch it will still face in Y-Axis, you just rolled the vector by 90 degrees (end result in 90 degree yaw and 90 degree roll).
If you first rotate 90 degrees by pitch, then now it is facing in Z-Axis. Then 90 degrees by Yaw and it will still face in Z-Axis you have again rolled it now by -90 degree, so end result is 90 degree pitch and -90 degree roll.
Hey,
thanks for the response! So what you are saying is that “combine Rotator” first applies the A rotation in x,y,z and after that the B rotation? Your example was good but it only concentrated on one rotator, doesn’t it?
Imagine you have something attached to a character (e. g. a weapon) and you have a vector in world space that you want to rotate into the weapon space. E. g. if the vector would point in (x=1, y=0, z=0) and you rotate it by CombineRotators A being character rotation, B being weapon rotation relative to character, this vector will now point in the forward direction of the weapon. You could ofc achieve the same result by just taking world rotation of the weapon and rotating the vector by that.
Or if you got a mesh that faces in Y direction (so has a rotation offset of -90 yaw, so with the actor having 0 rotation, the actors forward vector is in X-Axis, but the mesh points in Y-Axis). Now if you want that mesh to point at some location (e. g. FindLookAtRotation) and just use that rotation, your forward axis will face that direction. But since the mesh has an offset of -90 yaw to that forward axis, it will not face to that direction you want. To solve that you would use CombineRotators where you first apply that rotation offset, so -90 yaw and then the result of FindLookAtRotation.
So if you want to combine rotators, you cannot do that by adding or subtracting them, you need to use CombineRotators.