Hi,
I have a question regarding a weird offset I get with 3D objects.
I receive a camera preview with faces on it. I want to show 3d objects on these faces, think about masks etc.
What I do is get the position of the face on the 2d preview and translate it to the 3d space with Interact2D.reproject2D3DWS().
I get a very weird offset though, where i can't seem to get the 3d object on the position that I want it to be. For example, I have the top left coordinates of the face but the 3d object will appear significantly to the left side.
What would the ideal circumstances be for a 2dto3d translation, in terms of the z axes, 3d model itself etc.
EDIT: I'm kinda confused now how reproject2dto3dWS() works now. If i put the object at x, y=100, the object barely moves on the x axis on screen and is like halfway they axis.
EDIT2: The idea that I want to implement is very simple but I'm having a really hard time with it. See the image for a simple illustration.
I have the face's positions and just want to overlay it with a 3d model.
The code that should give me the correct world space position is:
SimpleVector simpleVector = Interact2D.reproject2D3DWS(world.getCamera(), GLFrameBuffer, (int) faceRect.tl().x, (int) faceRect.tl().y, 20);