Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2011, 12:58:09 AM (13 years ago)
Author:
dafrick
Message:

Merging bigships branch into presentation branch.

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/worldentities/MobileEntity.cc

    r7163 r8589  
    143143    {
    144144        if (this->isDynamic())
     145        {
    145146            this->physicalBody_->applyCentralForce(btVector3(acceleration.x * this->getMass(), acceleration.y * this->getMass(), acceleration.z * this->getMass()));
    146 
     147        }
     148
     149        // If not bullet-managed (deprecated? SpaceShip doesn't use this anymore for movement)
    147150        this->linearAcceleration_ = acceleration;
     151    }
     152
     153    void MobileEntity::addAcceleration(const Vector3 &acceleration, const Vector3 &relativePosition)
     154    {
     155        if(this->isDynamic())
     156        {
     157            this->physicalBody_->applyForce(this->getMass() * btVector3(acceleration.x, acceleration.y, acceleration.z), btVector3(relativePosition.x, relativePosition.y, relativePosition.z));
     158        }
    148159    }
    149160
Note: See TracChangeset for help on using the changeset viewer.