Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - stonef

Pages: [1]
Support / Rotate relative to fixed axis?
« on: May 05, 2011, 03:29:59 am »
How do i rotate a Object3D relative to it's originally fixed axis? Like for example if i want to rotate without jPCT i call
gl.glRotatef(xangle, 1, 0, 0) //rotate X axis
gl.glRotatef(yangle, 0, 1, 0) //rotate Y axis

Meaning i will always let Z be unchanged.

If i use myObj.rotateX / myObj.rotateY i will end up with Z axis changed as well.

Support / 3D coordinates on rotated object
« on: May 04, 2011, 05:30:35 am »
Hi, im trying to deevelop a game with this brilliant game engine for Android.
However im stuck at a quite early stage due to the fact that i can't
figure out how to get the coordinates on the object (the object is rotatable).

Iv'e imported a sphere shaped object in .3ds and with texture of a world map
it's supposed to be a globe. Now what i would like to do is to get
coordinates on the globe using touch. The problem is not getting the Z coordinate since
i can use mathematic for that, but it's how to get the coordinates depending on how
the object is rotated. (To make it easier to understand, my later on goal is to get the right longitude/latitude of the world by a touch event).

If you understand my situation and have any suggestion, I would love to here them. Thanks in advance

Pages: [1]