Hi!
Im trying to compare the yaw of an actors rotation and a calculated yaw, once my actor reaches the calculated yaw I would like to actor to stop rotating…
However… my calculated yaw might be over 180 degrees (for instance it could be 270 dregrees or 360 or even more or anything in between)…
The problem is that once I retrive the yaw from my actor using Get Actor Rotation–>Break Rot–>Yaw… the yaw is always between 0-179.9999 or -179.999-0, so basically I would need a way to convert my calculated value into the same “format”… is it possible to some how simply “convert” the calculated value?
Im not sure if I did get you right :)… but I just tried your suggestion to substract 180 from the actors yaw, but that did not work… what I think I need is a way to turn my calculated yaw into the same “negative format” as the actors yaw once it reaches above 180 degrees.
Wasnt your Problem something with -130 to 130? So you were missing 100°? it seems normal that the range goes from -180 to +180. At least thats a circle i guess there are moments when a negativ value is usefull.
I still think he just needs to add 180 to this number so it 0 to 360.
im having a similar issue, i have a drone that tilts sideways on its Y axis depending on the Z rotation amount, however once it goes from 180 to a - value or the other way around from 50 to -50 as soon as the value becomes negative the Y axis jumps to the opposite side (instead of going smoothly as it does from 0 to 180, or even from -1 to -180)…
adding +180 to keep it as a positive value always did nothing if not make this even more buggy for me…
In the current version of Unreal Engine, there are a few nodes under the Rotator or Rotation section of the context menu in the Blueprint editor, which might fix this problem for you, and they let you choose whether to go the long way around or the short way. Likewise every blueprint node has a C++ function or object it corresponds to.
I believe I saw one that is specifically for the situation you’re describing.