I’m trying to offset my initial cube position into the detected surface by a fixed distance.
If the pose initializer has a support plane, I want to shift the volume box into the surface it has detected.
Currently, during cube positioning, I am taking the cameraPose from STPoseInitializer and adjusting the x coordinate using GLKMatrix4Translate.
However, if I rotate my device 90 degrees and use the same code, instead of the cube moving into the surface, it moves to the side.
How can I translate the cameraPose along the normal of the surface is has detected so it is independent of my device position?