Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 9, 2011, 2:59:07 PM (13 years ago)
Author:
decryphe
Message:
  • Moved handling of blur effect from Engine.cc to SpaceShip.cc.
  • Implemented handling of multiple engines per SpaceShip, so that in future it would be possible to turn single engines on/off individually (for example if one gets destroyed on a big ship).
  • Updated some pointers accessing the single Engine of a SpaceShip to ask the SpaceShip itself instead for data.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/bigships/src/orxonox/worldentities/MobileEntity.cc

    r7163 r8426  
    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;
    148151    }
     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                }
     159        }
    149160
    150161    void MobileEntity::setAngularAcceleration(const Vector3& acceleration)
Note: See TracChangeset for help on using the changeset viewer.