Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 12, 2007, 3:11:44 PM (16 years ago)
Author:
landauf
Message:

added acceleration, rotationRate and momentum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/WorldEntity.cc

    r461 r472  
    2828        }
    2929
    30         this->bStatic_ = false;
     30        this->bStatic_ = true;
    3131        this->velocity_ = Vector3(0, 0, 0);
     32        this->acceleration_ = Vector3(0, 0, 0);
     33        this->rotationAxis_ = Vector3(0, 1, 0);
     34        this->rotationRate_ = 0;
     35        this->momentum_ = 0;
    3236    }
    3337
     
    4044        if (!this->bStatic_)
    4145        {
     46            this->velocity_ += (dt * this->acceleration_);
    4247            this->translate(dt * this->velocity_);
     48
     49            this->rotationRate_ += (dt * this->momentum_);
     50            this->rotate(this->rotationAxis_, dt * this->rotationRate_);
    4351        }
    4452    }
Note: See TracChangeset for help on using the changeset viewer.