1

I am trying to rotate object on it's local axis using absolute rotation values. I am facing two issues 1. It looks like my object is rotating around world axes. For example set X, Y and Z to 45 degrees and try changing X. 2. If Y is set to 90 degrees, I get into gimbal lock issue.

I am using quaternion by setting rotation as follow

 cube.quaternion.setFromEuler(new THREE.Euler(x, y , z));

A demo snippet is JSFiddle

I came across this article ThreeJS - rotation around object's own axis, but that didn't helped me.

I have been trying different solution using Euler and Matrix but still not able to make it work.

Looking for help to figure out the solution to this problem.

rjain
  • 23
  • 4

0 Answers0