Using HammerJS, I am able to manipulate a 3D object within an augmented reality environment.
Everything functions properly unless I physically move my phone (which serves as the camera)...
const newTranslation = new THREE.Vector3(this._initTranslation.x + e.deltaX, this._initTranslation.y, this._initTranslation.z + e.deltaY);
The initial translations correspond to the original position of the Object3D.
While navigating around, the movement remains restricted to the x and z axes that were initially set. For example, if I slide my finger upwards on the phone (with the intention of moving the object backwards along the z-axis), it instead shifts from left to right.
I understand that I need to factor in the camera's rotation in order to translate correctly from camera space to world space, but I am unsure how to accomplish this.
Thank you in advance for any assistance provided.