Help with three.js and webXR

Hello all,

I’ve been working on a 3D model viewer using three.js and the WebXR Device API. I’ve gotten to the point where I can place a 3D model on a plane found with the hit-test feature of the WebXR API. I now have a few problems.

First problem is that if I copy the pose to my 3D model (position and orientation) of the hit test result, the 3D model’s axes may not align with the world axes, meaning the x axis may not be exactly left to right. It might be rotated a bit on the y axis because the plane might be at an angle.

Second problem I have is with translation. I am unable to translate the object along the plane. This might be due to the orientation derived from the hit test pose not being 100% correct. I’m not entirely sure. I’ve thought about trying to visualize the axes of the hit-test plane so I can visualize it, but I’m not sure how to go about this or if I’m even on the right path to figuring this out. Any help would be appreciated.

I would be willing to pay for someone to help me figure this out.

I’ve also asked a question on stackoverflow about this problem: https://stackoverflow.com/questions/63266836/three-js-translate-on-offset-plane

Thank you