Rotating around cube with babylon --> gimbal lock

hey folks,

i want to make a game where the player rotates the character 360° and even more around a 3D cube but where the player always does see the character on the right side of the cube. so the perspective of the camera has to change regarding on what side of the cube the character is positioned.

so multiple roatations around the cube not only have to be possible but are the usual case.
with researching i stumpled upon the problem of gimbal lock.

so before learning this new framework i wanted to ask: is this even possible to code with javascript and babylon.js without having the problem of gimbal lock?

and if so… what topics should i look into?

ROLF

To avoid Gimbal Lock issues, you ll need to exclusively rely on Quaternions instead of euler angles: Rotation Quaternions | Babylon.js Documentation
Understanding Quaternions |.

1 Like