Gimbal Lock Of 'Set World Rotation' Node [4-27]

Hello Everyone. I have been working on a code with ‘Find look at rotation’ And ‘Set World Rotation’ Blueprints. The thing is i want only rotation on one axis the Y axis (it doesnt really matter i have the same problem on other axis). But the problem is in Find Look at Rotation Node when ‘Target’ goes behind ‘the Start component’ it will not rotate fully. in other word when it gets to 90 degrees it wont go past that to for exampel 150 degrees. I found out it’s something called gimbal lock.
Does anyone know how i can disable gimbal lock in set world rotation node? or a way to disable it completely from unreal engine? i dont really need it
I would really apreciate your help
Also i have tried set relative rotation it didnt work for some reason

LookAt will always work if you directly set world rotation from it. There is a problem with rotations exceeding ±180 and getting corrected by the engine, you may be having a problem with that.

Can you show how you’re setting the rotation?

Hello Sorry for the late reply
I uploaded a video explaining my problem
https://www.youtube.com/watch?v=9LxfJW4sE2w

I’ve made the same BP, in fact I’m rotating on Z, but the same principle applies:

image

This is as good as you can get when only rotating on one axis:

1axis

Very Interesting Blueprint. but it didnt fix the problem. I guess it has to be gimbal lock.i’ll look for more solutions, maybe another way. i’ll let you know if i find a way.
Thanks for giving me your time. :heart:

I think I’m missing the point. The cube is rotating on 1 axis and facing the player.

What did I miss?

If you have problems with gimbal lock ( which this is not ), you’ll need to use C++ or a plugin, so you can do it with quaternions.

PS: I notice there is some quaternion functionality in BP now, I don’t know if it’s the whole thing…

On Z axis it rotates fine. But on Y Or X It is not. When it gets to 90 Degrees It Wont Go Past That.

Ok :slight_smile:

Lemme take a look…

That look at node is made to rotate on Z, why fight it. If you have a blueprint component you really want to rotate on Y, you can just use a scene component to offset it.

Yeah I guess I’ll give up for now. I can always get help in the future.
Thanks For helping out :raised_hand:

1 Like