Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3986 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Apr 26, 2005, 12:38:20 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed two major bugs in the animation3d framework (addKeyFrame, tick issues), added shoot animation again. one of both animation is still placed at the wrong place, since the weapons are not symmetrical

Location:
orxonox/trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/environment.cc

    r3964 r3986  
    5050void Environment::draw ()
    5151{
    52   //this->getRelCoor()->debug();
     52  //this->getRelCoor().debug();
    5353
    5454  glMatrixMode(GL_MODELVIEW);
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3980 r3986  
    5050  this->animation1 = new Animation3D(this->objectComponent1);
    5151  //this->animation2 = new Animation3D(this);
    52   parent->addChild(this->objectComponent1, PNODE_ALL);
     52  //parent->addChild(this->objectComponent1, PNODE_ALL);
     53  this->addChild(this->objectComponent1, PNODE_ALL);
    5354
    5455  this->animation1->setInfinity(ANIM_INF_CONSTANT);
     
    5859      this->projectileOffset = Vector(1.0, 0.0, -0.35);
    5960
    60       this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
    61       this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR);
    62       this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
    63 
    64       //this->animation2->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    65       //this->animation2->addKeyFrame(Vector(-2.6, 0.1, 1.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     61      //this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
     62      //this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR);
     63      //this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
     64
     65      this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     66      this->animation1->addKeyFrame(Vector(-0.4, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     67      this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT);
     68
     69
     70      //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     71      //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     72      //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    6673    }
    6774  else if( this->leftRight == W_RIGHT)
     
    6976      this->projectileOffset = Vector(1.0, 0.0, 0.5);
    7077
    71       this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_NEG_EXP);
    72       this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_NEG_EXP);
    73       this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_NEG_EXP);
     78      //this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
     79      //this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR);
     80      //this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
     81
     82      this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     83      this->animation1->addKeyFrame(Vector(-0.4, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     84      this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT);
     85
     86
     87      //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     88      //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     89      //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    7490    }
     91
    7592}
    7693
     
    95112{
    96113  printf("ACTIVATE \n");
    97   this->animation2->replay();
     114  //this->animation2->replay();
    98115}
    99116
     
    180197void TestGun::draw ()
    181198{
     199  //this->getRelCoor().debug();
     200  //this->getAbsCoor().debug();
     201
     202  this->objectComponent1->getRelCoor().debug();
     203  //this->objectComponent1->getAbsCoor().debug();
     204
    182205  /* draw gun body */
    183206  glMatrixMode(GL_MODELVIEW);
Note: See TracChangeset for help on using the changeset viewer.