animated box always move

asked 2016-11-02 19:15:15 -0600

xxie gravatar image

I followed the animated box tutorial and everything works fine.

Then I tried to go further to control the movement of the box but I found it does not work.

For example, I wrote

  key = this->anim->CreateKeyFrame(30.0);
  key->Translation(ignition::math::Vector3d(0.0, 10.0, 10.0));
  key->Rotation(ignition::math::Quaterniond(0.0, 0.0, 0.0));

  key = this->anim->CreateKeyFrame(160.0);
  key->Translation(ignition::math::Vector3d(0.0, 10.0, 10.0));
  key->Rotation(ignition::math::Quaterniond(0.0, 0.0, 0.0));

That means I want the box will be static between 00:30:00 - 02:40:00. However the box continues to move, slowly but steady. I comment out nearly all parameters in .world file but everything remains the same.

Is there anyone know why this happen and how to fix that problem?

edit retag flag offensive close merge delete