Why when i rotate an actor from a blueprint or rotation tool from the editor, the values change betwen -90 and 90. this is weird. if the value pass for example over than 90 it change to 79,999 but still rotating like it was 91 degrees and sometimes ramdomly change to 91. Im lost and confused
If you want to rotate something steadily in BP, then you need to use an ‘add rotation’ node. If you use a ‘set’ node ( like SetWorld or SetRelative ), the system will randomly add or subtract 180 at various points.
Could you explain better why it happens?
Because I’m trying to create a door in VR and that’s exactly what’s happening when trying to make the door follow the hand, at some points the door simply rotates the opposite way, generally when reaching 70-90 degrees. Also when I start to trach the controller to the door to follow it, it offsets like 90, sometimes 180 degrees and I can’t understand why. Tried adding or subtracting 180 from the rotation float, it works for some cases but as soon as you rotate the door to place it somewhere else it doesn’t work anymore.
If you’re trying to control rotation directly, with a set node, you have two options
Don’t go past +/- 179
Use rotator variables and add the rotation, using ‘combine rotators’
A lot of people split open rotators, or only rotate in one axis, and that will give you the 180 jumping problem, because you’re not taking the other two axis into account.
You might say, well, I only want to rotate on one axis, I don’t understand what the problem is, it’s a simple concept…
The answer to that is quite plain if you drop a cube in the level, give it a bit or rotation in one direction, and then start rotating it progressively on another ( with the widget ).
You’ll see the rotation values jumping all over the place, even though the cube seems to be under control.
It’s because rotations aren’t as simple as they look.
This is why even NASA had problems with their first gyro system, when they were testing it with fighter pilots.