Author Topic: JPCT Coordinate system  (Read 1982 times)

Offline minasamy

  • byte
  • *
  • Posts: 2
    • View Profile
JPCT Coordinate system
« 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: JPCT Coordinate system
« Reply #1 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

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.
« Last Edit: January 16, 2012, 09:39:20 am by EgonOlsen »

Offline minasamy

  • byte
  • *
  • Posts: 2
    • View Profile
Re: JPCT Coordinate system
« Reply #2 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: JPCT Coordinate system
« Reply #3 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.

Offline K24A3

  • long
  • ***
  • Posts: 231
    • View Profile
Re: JPCT Coordinate system
« Reply #4 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).