www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: minasamy on January 16, 2012, 09:07:39 am

Title: JPCT Coordinate system
Post by: minasamy on January 16, 2012, 09:07:39 am
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
Title: Re: JPCT Coordinate system
Post by: EgonOlsen on January 16, 2012, 09:33:00 am
No, you can't change the coordinate system. Some brief information about the coordinate system: http://www.jpct.net/wiki/index.php/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

Code: [Select]
model.rotate((float)Math.PI);
model.rotateMesh();
model.clearRotation();

That will rotate the mesh permanently.
Title: Re: JPCT Coordinate system
Post by: minasamy on January 16, 2012, 02:27:04 pm
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
Title: Re: JPCT Coordinate system
Post by: EgonOlsen on January 16, 2012, 09:37:08 pm
No, just use what you have and know and rotate the model in place after loading it.
Title: Re: JPCT Coordinate system
Post by: K24A3 on January 17, 2012, 08:44:19 am
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).