Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2780 for code/trunk


Ignore:
Timestamp:
Mar 12, 2009, 7:36:12 PM (16 years ago)
Author:
rgrieder
Message:

Checking whether a function really does what you think might sometimes help ;)
Bullet stores the transformation as matrix, not as vector and quaternion like ogre.

This little fix equals a speed gain of about 1.4% in dedicated mode without clients and 30 bots.

File:
1 edited

Legend:

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

    r2710 r2780  
    182182        // We use a dynamic body. So we translate our node accordingly.
    183183        this->node_->setPosition(Vector3(worldTrans.getOrigin().x(), worldTrans.getOrigin().y(), worldTrans.getOrigin().z()));
    184         this->node_->setOrientation(Quaternion(worldTrans.getRotation().w(), worldTrans.getRotation().x(), worldTrans.getRotation().y(), worldTrans.getRotation().z()));
     184        btQuaternion temp(worldTrans.getRotation());
     185        this->node_->setOrientation(Quaternion(temp.w(), temp.x(), temp.y(), temp.z()));
    185186        this->linearVelocity_.x = this->physicalBody_->getLinearVelocity().x();
    186187        this->linearVelocity_.y = this->physicalBody_->getLinearVelocity().y();
Note: See TracChangeset for help on using the changeset viewer.