Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2008, 12:24:30 AM (16 years ago)
Author:
FelixSchulthess
Message:

moved to spaceship what belonged there

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1399 r1400  
    112112        this->setConfigValues();
    113113
     114        initialDir_ = Vector3(1.0, 0.0, 0.0);
     115        currentDir_ = initialDir_;
     116        initialOrth_ = Vector3(0.0, 0.0, 1.0);
     117        currentOrth_ = initialOrth_;
    114118
    115119        this->setRotationAxis(1, 0, 0);
     
    247251      this->camNode_ = this->getNode()->createChildSceneNode(camName_);
    248252      COUT(4) << "position: (this)" << this->getNode()->getPosition() << std::endl;
    249       this->camNode_->setPosition(Vector3(-50,0,10));
     253      this->camNode_->setPosition(Vector3(0,0,0));//-50,0,10));
    250254//      Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0));
    251255//      Quaternion q2 = Quaternion(Radian(Degree(90)),Vector3(0,0,-1));
     
    395399    }
    396400
    397     Vector3 SpaceShip::getSPosition() {
    398         return SpaceShip::getLocalShip()->getPosition();
    399     }
    400 
    401     Quaternion SpaceShip::getSOrientation() {
    402         return SpaceShip::getLocalShip()->getOrientation();
     401    Vector3 SpaceShip::getDir() {
     402        return currentDir_;
     403    }
     404
     405    Vector3 SpaceShip::getOrth(){
     406        return currentOrth_;
    403407    }
    404408
     
    407411    void SpaceShip::tick(float dt)
    408412    {
     413        currentDir_ = getOrientation()*initialDir_;
     414                currentOrth_ = getOrientation()*initialOrth_;
     415
    409416        if (this->cam_)
    410417            this->cam_->tick(dt);
Note: See TracChangeset for help on using the changeset viewer.