- Timestamp:
- Dec 11, 2008, 1:54:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/MovableEntity.cc
r2374 r2407 108 108 if (this->isDynamic()) 109 109 { 110 //if (this->isPhysicsRunning())111 // return;112 110 btTransform transf = this->physicalBody_->getWorldTransform(); 113 111 transf.setOrigin(btVector3(position.x, position.y, position.z)); … … 115 113 } 116 114 117 //COUT(0) << "setting position: " << position << std::endl;118 115 this->node_->setPosition(position); 119 116 positionChanged(false); … … 212 209 OrxAssert(relativeTo == Ogre::Node::TS_LOCAL, "Cannot align physical object relative \ 213 210 to any other space than TS_LOCAL."); 214 //btTransform transf = this->physicalBody_->getWorldTransform();215 //this->physicalBody_->setWorldTransform(transf);216 211 } 217 212 … … 227 222 OrxAssert(relativeTo == Ogre::Node::TS_LOCAL, "Cannot align physical object relative \ 228 223 to any other space than TS_LOCAL."); 229 //btTransform transf = this->physicalBody_->getWorldTransform();230 //this->physicalBody_->setWorldTransform(transf);231 224 } 232 225 … … 288 281 this->node_->setPosition(Vector3(worldTrans.getOrigin().x(), worldTrans.getOrigin().y(), worldTrans.getOrigin().z())); 289 282 this->node_->setOrientation(Quaternion(worldTrans.getRotation().w(), worldTrans.getRotation().x(), worldTrans.getRotation().y(), worldTrans.getRotation().z())); 290 COUT(0) << "setting world transform: " << omni_cast<std::string>(node_->getPosition()) << std::endl;291 283 this->linearVelocity_.x = this->physicalBody_->getLinearVelocity().x(); 292 284 this->linearVelocity_.y = this->physicalBody_->getLinearVelocity().y();
Note: See TracChangeset
for help on using the changeset viewer.