Hi everyone,
I’ve been experiencing with rotation in blueprint a lot lately, but can’t seem to get the basics straight and I’m finding different, contradictory explainations on the internet, so I’m just gonna ask a few things here:
-
When do I use which rotation (setworldrotation, setrelativelocation, addlocalrotation)?
-
Which boundaries do pitch, yaw and roll have? I found some info saying, that they must be between 0 and 360° which kind of makes sense to me, but If I print the rotations to the screen while my programm runs, the rotation values are often negative. So whats up with that?
-
Imagine I have a blueprint scene “root” and in a relative distance (e.g. 10,0,0) I have a static mesh body (e.g. a cube). If I rotate the root, the static mesh follows accordingly and it rotates around the same axis, which are the axis of the root, right? Shouldn’t be the pitch, yaw and roll compnents of the root and the static mesh be the same than? Because if I try this, I get different rotation values for the scene root and the static mesh body.
-
If I combine two rotators with the combine module (e.g. both have the values 5,5,5), why isn’t the result the sum (5+5 = 10) but some diffrent value?
I know these questions might be easy peasy for most of you, but I kind of got lost and I can’t seem to find out those basics. So thanks for every help in advance!
Thank you so much for your reply! These answers are really helpful, especially “findlookatroation” and the last part about the different roatations.
P.S. I’ve started three month ago, not in 2018 
1 Like
Hi NachoMonkey2,
wow, I couldn’t have hoped for a more thorough explaination, so thank you so much! This was really helpful! Of course I have some follow-up questions 
-
If I set the relative rotation of the cube to 0,0,0 and change the world rotation of it’s root to, let’s say 50,50,50, the relative rotation of the cube remains 0,0,0 and it’s world rotation is equal to the roots (50,50,50), is that correct? Is it somehow possible that the relative rotation of the cube changes (unwantedly) during the run of the programm without me redefining it?
-
So it doesn’t really matter if I dont use “clamp axis”, Unreal calculates the values on it’s own?
Have you had any experience with a sudden flip of the rotation somewhere around 0° or 180°? I sometimes experience a change in sign (from 180° to -180°). This appears if i work with unreal leap, so maybe that question is to offbeat 
Hi ClockworkOcean,
this cleared up a lot aswell, especially the first and the last point, thanks for your help! I tried using quaternions in the past but I didn’t get very far because I don’t know how to define them (4 values? whats w?) and I couldn’t figure out how to combine them with Euler-Roation-values (Is it even possible?)
You’ll get on fine if you stick with Euler and only use AddLocalRotation when you have problems with it jumping between 180 and -180.
1 Like
All your info posted previously are very helpful. Yet I’m still getting some behaviors on my BPs during gameplay.
I got this door setting, where the door should rotate to match the motion controller hand. It works, but I can’t explain why, if I rotate the door in the play area, say 90 degrees, then it doesn’t work anymore, it rotates the opposite way, and I also don’t know why.
I had to add this minus 180 on the float in order to get it to work as it has this 180 degrees offset when I tried the first time.
It just doesn’t make any sense to me, on my other tests, if I simply swap start and target input locations, the rotation changes to opposite direction whenever it hits 90 degrees.
Honestly, makes a lot of sense when I’m reading your post but when I try to set this up on my project it just doesn’t work. I tried using set local rotation as well and it gets even worse.
Please help me xD