My mesh is a 'hexagonal prism' It's initial creation places it like this. Start rotation of pi/2 about x axis correctly gives Rotate PI/2 about X axis Now for a rotation of pi/2 about the z axis I would expect Expect rotation of PI/2 about Z to give this However I get a rotation about the y axis instead But get this You can try is out at the playground. When Xr is a rotation of pi/2 around the x axis, Yr is a rotation of pi/2 around the y axis and Zr is a rotation aro
Seem to have solved the problem using quaternion rotation (at least for the specific case or rotation about X then about Z). Created this function to rotate anti-clockwise a given position vector p about an axis through and angle function rotateParoundAxis(p, axis, angle) { //p is position (Vector3) to rotate clockwise about axis (Vector3) through angle var _p = new BABYLON.Quaternion(p.x, p.y, p.z, 0); //change p to quaternion for quaternion multiplication axis.normalize(); //