So I’ve been making a scene where when you touch a mesh it will first, get that side of the mesh and return to me this position and rotation Quaternion. To this, I can create a plane of the same position and add an Iframe to it.
However, since the iframe uses rotation instead of quaternion, it does not translate properly.
I’ve managed to use
mesh.rotationQuaternion.toEulerAngles() to get the vectors of each. But it only works on the y angle (which uses the z value of the given function. I know, its weird xD ).
Is there a way to properly use the quaternion value to the plane mesh without translating it to euler angles (I’ve tried
mesh2.rotationQuaternion = mesh.rotationQuaternion but it stretches it to the scene) or if not how can I rotate it on the remaining 2 angles?
I’ve prepared a playground to visualize my issue. (When you click on the front and left blocks, it is showing properly. However, if you click on the right(slanted) block the plane/iframe doesn’t really show properly)
I look forward to the collaboration ahead!