Author Topic: Transformations and Animations  (Read 1311 times)

Offline claydergc

  • byte
  • *
  • Posts: 6
    • View Profile
Transformations and Animations
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12086
    • View Profile
Re: Transformations and Animations
« Reply #1 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.