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

**URL:** https://forum.babylonjs.com/t/how-do-i-get-the-vector-values-of-the-three-axes-on-the-camera-coordinate-system-relative-to-the-world-coordinates/49829
**Category:** Questions
**Created:** [April 19, 2024, 8:12am UTC](https://forum.babylonjs.com/t/how-do-i-get-the-vector-values-of-the-three-axes-on-the-camera-coordinate-system-relative-to-the-world-coordinates/49829 "2024-04-19T08:12:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nabla-GIT](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nabla-git/32/39109_2.png) [@Nabla-GIT](https://forum.babylonjs.com/u/Nabla-GIT)
#### Post date: [April 19, 2024, 8:12am UTC](https://forum.babylonjs.com/t/how-do-i-get-the-vector-values-of-the-three-axes-on-the-camera-coordinate-system-relative-to-the-world-coordinates/49829/1 "2024-04-19T08:12:39Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)
#### Post date: [April 19, 2024, 3:29pm UTC](https://forum.babylonjs.com/t/how-do-i-get-the-vector-values-of-the-three-axes-on-the-camera-coordinate-system-relative-to-the-world-coordinates/49829/2 "2024-04-19T15:29:46Z")

</div>

Welcome to the forums!

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

---

<div class="post-metadata">

### Author: ![Nabla-GIT](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nabla-git/32/39109_2.png) [@Nabla-GIT](https://forum.babylonjs.com/u/Nabla-GIT)
#### Post date: [April 21, 2024, 2:17am UTC](https://forum.babylonjs.com/t/how-do-i-get-the-vector-values-of-the-three-axes-on-the-camera-coordinate-system-relative-to-the-world-coordinates/49829/3 "2024-04-21T02:17:13Z")

</div>

❤Thank you for your reply.

💙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.

💚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)](https://playground.babylonjs.com/#VRE34R#1)

---

<div class="post-metadata">

### Author: ![qq2315137135](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qq2315137135/32/32219_2.png) [@qq2315137135](https://forum.babylonjs.com/u/qq2315137135)
#### Post date: [April 21, 2024, 11:12am UTC](https://forum.babylonjs.com/t/how-do-i-get-the-vector-values-of-the-three-axes-on-the-camera-coordinate-system-relative-to-the-world-coordinates/49829/4 "2024-04-21T11:12:23Z")

</div>

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)](https://playground.babylonjs.com/#VRE34R#2)

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