How to set Z coordinate system in three.js?

On the three.js axis, Y is displayed up and down, and the Z axis is displayed forward and backward. But I want the Z axis to represent up and down, and the Y axis to represent forward and backward. Here is an image showing what I want:

I want to change the entire coordinate system so that if I rotate the grid around the y axis, it follows the new coordinate system, not the traditional one.

Now I was looking for a stack overflow and found this link:

Is there any way to make three.js work like a Z-coordinate system?

+4
source share
1 answer

You can set the camera vector with

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

, .

+3

Source: https://habr.com/ru/post/1679633/


All Articles