How to change the default coordinate axes to Z-UP

I am working in new 3d editor for printing systems based on the threeJs editor but there is a needed to change default coordinate system from y-up to z-up. By searching in communities found some snippet code to implement that:

camera.up.set(0, 0, 1);

and rotate grid 90 ْ :

grid.rotateX(Math.PI / 2);

That’s work but occurs other problems:

  1. Cannot drag 360 ْ up-down it’s limited to 180 ْ
  2. Grid does not move in the same direction as the mouse drag for example you drag from left to right but grid revolves in up-down by some angle

How can i solve this issue?

1 Like

Can you perhaps work with eulerOrder, something like

camera.eulerOrder = “XZY”;

?

That’s not worked.

camera.eulerOrder = “XZY”;

I think it isn’t camera property !

It is a property of the Object3d and as such for the camera, and had helped me resolving a camera rotation issue (deprecating, now apparently ‘object.rotation.order’) . But you’re right, it is only for applying rotations using Euler, it doesn’t really effect the coordinate system when setting positions. My bad.