How to rotate an object with respect to it's local axes?

If I create a cone, the apex is pointing by default in the +y direction.
If I add an AxesHelper to the cone and then rotate the cone, the AxesHelper rotates with it.

const i = new THREE.Vector3(1, 0, 0);
const quaternion = new THREE.Quaternion();
quaternion.setFromAxisAngle(i, -Math.PI/2);
cone.setRotationFromQuaternion(quaternion);

https://jsfiddle.net/fiddleuser04/s8qfbam7/9/

How can I rotate the cone, with respect to the cone’s local coordinate system, such that the apex ends up pointing in the -z direction of the AxesHelper?

Have you considered to transform the cone geometry? https://jsfiddle.net/prmLd3o8/

1 Like

No, I had not considered that. Solves my problem. Thanks