Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10335 in orxonox.OLD


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

Location:
branches/playability/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/lib/math/curve.cc

    r10297 r10335  
    288288Vector BezierCurve::calcDir (float t)
    289289{
    290   return this->dirCurve->calcPos(t);
     290  return this->calcPos(t + 0.01) - this->calcPos(t);
     291  //return this->dirCurve->calcPos(t);
    291292}
    292293
  • 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;
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10333 r10335  
    884884        registerEvent(KeyMapper::PEV_VIEW5);
    885885
    886         State::getCamera()->setParentMode(PNODE_MOVEMENT);
     886        State::getCamera()->setParentMode(PNODE_ALL);
    887887
    888888        //this->updateTravelDistance();
Note: See TracChangeset for help on using the changeset viewer.