Set Rotation showing limited range


I’m creating a third person character controller with nodes, and i wanted to use a Set Rotation node to limit rotations to the Z axis, here is a simple scene demonstrating how i did this:

However, once the object rotates 90º it gets stuck, it can’t rotate any further.
I feel like i’m forgetting something obvious, but I can’t figure out why this happens. Can’t the Z rotation be defined only by one value?
I can upload the scene if that would help.



I don’t know the exact answer to your question, however I have seen in a few places that apparently armory handles rotations weird, especially the rotation of the Z axis. If I remember correctly, x and y go from something like zero to one radian, and z goes from like -90 to +90 euler degrees. I may have the details off, but it’s something along those lines. You can look up bug 514 on the Github issue tracker to see a bit more on this.



I think the bug you refer is #512. Thanks for your answer, now i see this is well aknowledged.
i’ll see if i can come up with some workaround, since the bug has existed for a while.
Any ideas?



Yeah, sorry, I meant #512. It’s a pretty infamous bug which shows up in far more places than are shown on the issue report.

Anyway, yeah, uploading your file would help to debug this as it isn’t exactly clear from a quick look at your node tree image what’s going on. Are those the only nodes involved with movement/rotation of the object?

Re: workarounds, does this forum post help?

1 Like


Thanks, using the angular factor actually works for what i’m doing right now.
About the file, that’s all there is, it’s a very simple one i made to show my problem:

SetRotationTest.blend (786.2 KB)

Simply, a node constantly rotates the cube in all three axis, then i use Set Rotation so that only Z rotation shows up.

Note that in my actual project I rotate my player along Z to align it with it’s velocity, but since it’s a physics object i need to prevent it from rotating along X and Y.

Also, i saw your topic on “How to align an object with a normal?”, that could offer a more dynamic solution. BTW, have you tried using the Z component from a Get Rotation node and the X,Y from the Look At node to feed the Set Rotation?