How to limit rotation without gimbal lock?

So, attempt 500 :slight_smile:

I have a drone ( blue cube ), the swing arm and the camera, in an actor. Notice the hierarchy

The spring arm is only connected to the actor, so the drone can be in any orientation. ( The drone is not connected to the boom ).

I’ve coded the actor to move forward slowly in X. I’ve also coded the drone to randomly adopt different rotations. And I can move the camera using the mouse to observe. The spring arm relative rotation is limited:

drone boom

This is the code for the boom, the rest ( not shown ), is just for moving the actor and drone

Any good!?

1 Like

Great work! I have not considered to use hierarchy like that. However, in your hierarchy, your camera does not rotate according to the drone and it should rotate in arc/circle in fact.
However, maybe I should fix your hierarchy like this as followed?
20220527175838
Thank you!

I think, with a grouping like that, your boom is still a victim of the drone rotation. But if it works for you, that’s great :smiley:

You are right, it does not work in this way finally. :rofl:

1 Like