Using ModelView Matrix

Started by great_apple_day, May 02, 2012, 12:06:58 AM

Previous topic - Next topic

great_apple_day

Hey guys,

I applied the AR ModelView matrix to camera (directly, without any manipulation) by using these codes:

mMatrix.setDump(mModelviewArray);
cam.setBack(mMatrix);

AR toolkit uses Right-Handed coordinate system but magically these lines of codes work and my model
shows up on the target and move accordingly. But the problem is the model is upside down and it lays
on its side. I tried to rotate the camera 90 degree (also -90) around the X axis (also Y,Z) but by doing
that the model disappears.

What could be the problem?

If I rotate the model itself it works fine but I think that is a little ugly.

Thanks in advance
Best,   


great_apple_day

Yes I had tried that earlier. But it doesn't work. The model still doesn't show up.

EgonOlsen

If everything works except for the model orientation, i would just rotate the model at load time (i.e. do the rotate, do a rotateMesh(), clear the rotation). It might very well be that the importer doesn't read the files in the orientation in which you expect them to be.

great_apple_day

Thanks for your answer. I converted the coordinate system before
using it in jPCT and now it works correctly.  ;)