www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: abhi13feb on March 29, 2008, 08:12:12 am

Title: how to control scaling and tranformations and orientations in JPCTDemo example
Post by: abhi13feb on March 29, 2008, 08:12:12 am
hey can someone tell me that how to control scaling and tranformations and orientations in JPCTDemo example
Title: Re: how to control scaling and tranformations and orientations in JPCTDemo examp
Post by: fireside on March 29, 2008, 10:08:59 am

Right before the level is added to the world, add the lines:
level.translate(x,y,z);
level.rotateX(float);
level.rotateY(float);
level.rotateZ(float);
level.scale(float);


I think that's right, but I'm kind of a noob with jpct and I haven't used Java in a while.
Title: Re: how to control scaling and tranformations and orientations in JPCTDemo example
Post by: abhi13feb on March 29, 2008, 10:15:45 am
So will it enable me to keep start position at any place and orientation.....?
see ..my main prob is to keep the postion ,orientation and scaling of atart postion as per my choice..
Title: Re: how to control scaling and tranformations and orientations in JPCTDemo examp
Post by: fireside on March 29, 2008, 11:51:36 am
The start position is the position of the camera.  You really need to work in the y-up position of the modeler so the gravity works, etc, so it's better to work on the orientation of your model inside your modeling program before you export it.  Just play around and you'll figure it out.