jPCT-AE - a 3d engine for Android => Support => Topic started by: claydergc on November 17, 2011, 06:34:07 pm

Title: Transformations and Animations
Post by: claydergc on November 17, 2011, 06:34:07 pm

I was testing the HelloWorld example that is included with the library. It shows a cube, however I would like to do an animation with that cube. For example, I want the cube to move depending of a math function; however, when I try to translate it, without a loop in the onDrawFrame(GL10 gl) method:

Code: [Select]
cube.translate(new SimpleVector(1, 0, 0));

It moves like an animation through the positive X axis, when I expected just to move one unit(1) to the right. This makes me difficult to move an object depending of a math function. I would like to move it with a Thread, but this doesn't help me.

So, is it possible to move an object without animating it, as it is done in OGL?

Thanks for your answer.
Title: Re: Transformations and Animations
Post by: EgonOlsen on November 17, 2011, 08:38:01 pm
I'm not sure, but i guess what you want is absolute positioning!? If that's the case, just do

Code: [Select]

...or use setOrigin(...) instead.