Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10335 in orxonox.OLD for branches/playability/src/util


Ignore:
Timestamp:
Jan 24, 2007, 4:43:49 PM (17 years ago)
Author:
bknecht
Message:

track now works pretty good. I'm really pleased. Check it out, it doesn't crash anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/util/track/track.cc

    r10297 r10335  
    7171  this->trackNode = new PNode(PNode::getNullParent(), PNODE_ALL);
    7272  this->nodeCount = 0;
     73  this->localTime = 0;
    7374}
    7475
     
    197198//   if (this->localTime <= this->maxTime)
    198199     this->localTime += dt;
     200     if(this->localTime >= this->duration)
     201       this->localTime = 0;
    199202//   if (this->localTime > this->currentTrackElem->endTime
    200203//       && this->currentTrackElem->children)
     
    216219       Vector tmp = this->calcPos();
    217220       //Quaternion quat = Quaternion(this->calcDir(), Vector(this->curve->calcAcc(this->localTime/this->duration).x,1,this->curve->calcAcc(this->localTime/this->duration).z));
    218        Quaternion quat = Quaternion(this->calcDir(), 0);
     221       
    219222
    220223       Vector v(0.0, 1.0, 0.0);
     224       Quaternion quat = Quaternion(this->calcDir(), v);
    221225       Quaternion q(-PI/2, v);
    222226       quat = quat * q;
Note: See TracChangeset for help on using the changeset viewer.