Spinning Static Mesh Glitch
I have an object, a huge box that is my "outside" in my level. I am trying to get it to rotate so I set the mesh to "movable" then "add component" and did a "scene blueprint", here is the code I have below:
Everything is going fine, until I think it hits one full rotation and then it gets stuck and glitches out by wiggling back and forth, like its stuck. Any help would be great, thanks.
asked Dec 18 '15 at 06:44 PM in Blueprint Scripting
This is due to how rotation works in a 3D space. When it comes to programming how rotation works, the use of Quaternions is required which ends up with the rotation axis not always be 0 to 360 or -180 to 180. In the case of Pitch (rotating along the Y) this value cannot go past 90 degrees. The stuttering is a result of the rotation being set past 90 and then being brought back.
This would require some complicated equations to get the desired effect. If it works for you however, you can use a Rotating Movement component to achieve the same effect, which will take into account these restrictions and work past them. Please note that the value for the rotation on the Rotating Movement component will need to be much higher than what it was per Tick, as 0.1 won't even look like it's moving.
Hope this helps!
answered Dec 18 '15 at 10:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here