- Timestamp:
- May 26, 2011, 12:04:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/bigships/src/orxonox/worldentities/MobileEntity.cc
r8426 r8588 143 143 { 144 144 if (this->isDynamic()) 145 145 { 146 146 this->physicalBody_->applyCentralForce(btVector3(acceleration.x * this->getMass(), acceleration.y * this->getMass(), acceleration.z * this->getMass())); 147 148 149 147 } 148 149 // If not bullet-managed (deprecated? SpaceShip doesn't use this anymore for movement) 150 150 this->linearAcceleration_ = acceleration; 151 151 } 152 152 153 154 155 156 157 158 159 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 } 160 160 161 161 void MobileEntity::setAngularAcceleration(const Vector3& acceleration)
Note: See TracChangeset
for help on using the changeset viewer.