How do I get the vector values of the three axes on the camera coordinate system relative to the world coordinates?

Hi !

How do I get the vector values of the three axes on the camera coordinate system relative to the world coordinates?

Now I can only use camera.getDirection(BABYLON.Axis.Z)*(-1) to get the value of the z-axis, but how to find the vector value of the XY axis?

Welcome to the forums!

Does camera.getDirection(BABYLON.Axis.Y) and camera.getDirection(BABYLON.Axis.X) not work?

:heart:Thank you for your reply.

:blue_heart:It’s not intuitive that this just returns the difference between the camera’s direction vector (Z axis on camera) relative to the X and Y axes in world coordinates.

:green_heart:What I need is the vector values of the three axes of the camera’s coordinate system in the world coordinate system

here’s the example: Direction Test | Babylon.js Playground (babylonjs.com)

But camera.getDirection(BABYLON.Axis.XYZ) is indeed the vector value of the camera’s three axes in the world coordinate system. Is there something wrong with the expression or are we misunderstanding something.

Direction Test | Babylon.js Playground (babylonjs.com)

Changing the axes in line 39, you can see that the camera is moving slowly along three axes in world space