Hi i need to determin the world direction of the Y or X direction of an object. Basically i need something like .getWorldDirection but for Y or X axis.

Can i use matrixWorld to do this? I have seen that getWorldDirection uses matrixWorld but i donâ€™t know what matrixWorld actually is

Hi!

Something like this:

`worldDirection.setZ(0).normalize()`

So i have found all my answers here:

http://www.opengl-tutorial.org/assets/faq_quaternions/index.html#Q5

All the directions are in the 4x4 transformations matrix called worldMatrix.

Here is how to find all axis directions:

const e = object.matrixWorld.elements;

let dx =new THREE.Vector3();

let dy =new THREE.Vector3();

let dz =new THREE.Vector3();

dx.set(e[0], e[1], e[2])

dx = dx.normalize()

dy.set(e[4], e[5], e[6])

dy = dx.normalize()

dz.set(e[8], e[9], e[10])

dz = dx.normalize()

That is not workingâ€¦ it is getWorldDirection().setZ(0).normalize()? I have tried that but the result is neither of three directions.