JPCT Coordinate system

Started by minasamy, January 16, 2012, 09:07:39 AM

Previous topic - Next topic

minasamy

Hi all
I'm new into the JPCT engine for Android.

I noticed that the coordinate system in JPCT is not like that of the standard OpenGL.
When I loaded my models they were inverted upside down.

is there a way to adjust the JPCT coordinate system to be similar to that of the OpenGL ?

Thanks

EgonOlsen

#1
No, you can't change the coordinate system. Some brief information about the coordinate system: http://www.jpct.net/wiki/index.php/Coordinate_system

BTW: If your models are upside-down (the loader should actually correct this, but depending on the exporter that created the file, it sometimes fails to do so...), just do


model.rotate((float)Math.PI);
model.rotateMesh();
model.clearRotation();


That will rotate the mesh permanently.

minasamy

Thanks for your response,
My Model was created using Maya and exported as a .OBJ file.
would you suggest another exporters that make this right instead of rotating the model ?
thanks

EgonOlsen

No, just use what you have and know and rotate the model in place after loading it.

K24A3

What I do is orientate the object in the 3D program itself so it loads correctly in jPCT. Y pointing down and Z facing you does the trick (in Blender at least).