0

I have rotated a group called pivot following this example:

https://jsfiddle.net/of1vfhzz/1/

And applying the function rotateAroundObjectAxis(object, axis, radians) from this thread:

Rotation around an axis three.js

the function is showed belove

function rotateAroundObjectAxis(object, axis, radians) {
                rotObjectMatrix = new THREE.Matrix4();
                rotObjectMatrix.makeRotationAxis(axis.normalize(), radians);

                object.matrix.multiply(rotObjectMatrix);

                object.rotation.setFromRotationMatrix(object.matrix);
            }`

The meshes inside pivot, rotate in the right way but also the axis orientation change and since I want move these object along the z axis, how can I do? There is a way to set up, after a rotation ,the z axis as before, without changing the rotation of this group of objects?

mikecolux95
  • 83
  • 1
  • 10

0 Answers0