Threejs position of the user around a target tracker

Hello everyone,

I am trying to know the position of the user around a tracked object (image).
What I have done is adding two vectors, to get the rotation of the camera around the object,

rightVector.set(1, 0, 0).applyQuaternion( camera.quaternion )
forwardVector.set(0, 1, 0).applyQuaternion( camera.quaternion )

But depending on where the user starts the effect around the tracker I don’t have the same values, right / left / back / front etc…
Sometimes front can be from x to x1 and the other time from x2 to x3
The tracker always point the same direction so there is maybe a way to match the tracker direction and the user position, if you have any idea on how to achieve that please let me know, :smiley:


What if the user turn the tarcker and does not move ?
Is there a way to know which direction of the tracker the user is facing ?
Thanks :slight_smile:

I’m not sure if the camera rotation will do anything. Sometimes in 3D engines, the camera never actually moves, and the scene rotates around it.

If you are using threejs, you could try Object3D.getWorldDirection