Transformations and Animations

Started by claydergc, November 17, 2011, 06:34:07 PM

Previous topic - Next topic

claydergc

Hello,

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:


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.

EgonOlsen

I'm not sure, but i guess what you want is absolute positioning!? If that's the case, just do


cube.clearTranslation();
cube.translate(...);


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