When working with three.js, the Y axis typically represents up and down, while the Z axis represents forward and backward. However, I want to switch this so that the Z axis represents up and down, and the Y axis represents forward and backward. Here is an image illustrating what I am aiming for:
https://i.sstatic.net/fSZzP.png
I am looking to completely change the coordinate system so that when I rotate a mesh around the y axis, it follows the new coordinate system rather than the traditional one.
After searching on stack overflow, I came across the following links:
- Three.JS rotate projection so that the y axis becomes the z-axis. Unfortunately, this method did not work as expected.
- THREEJS: Matrix from Z-Up Coordinate System to Y-Up Coordinate System. This approach only altered the object or mesh's y and z vertices; when I rotated it around the y axis, it still followed the traditional orientation. It seems that applying the matrix to the rotation matrix itself might be necessary to achieve the desired result.
- Changing a matrix from right-handed to left-handed coordinate system.
- Reorienting axes in three.js fails when webpage is refreshed. Unfortunately, this solution also did not yield the desired outcome.
Is there a way to configure three.js to align with a Z up coordinate system?