Changeset 7077 for code/branches/presentation3/src/orxonox
- Timestamp:
- Jun 2, 2010, 1:52:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/worldentities/Drone.cc
r7060 r7077 44 44 45 45 this->myController_ = 0; 46 46 47 47 this->localLinearAcceleration_.setValue(0, 0, 0); 48 48 this->localAngularAcceleration_.setValue(0, 0, 0); 49 49 this->setRadarVisibility(false); 50 50 this->setCollisionType(WorldEntity::Dynamic); 51 51 52 52 myController_ = new DroneController(static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator. 53 53 myController_->setDrone(this); … … 63 63 { 64 64 if( this->isInitialized() && this->myController_ ) 65 delete this->myController_;65 this->myController_->destroy(); 66 66 } 67 67 … … 92 92 { 93 93 SUPER(Drone, tick, dt); 94 94 95 95 //if (this->hasLocalController()) 96 96 //{ … … 103 103 this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_); 104 104 this->localLinearAcceleration_.setValue(0, 0, 0); 105 105 106 106 this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_; 107 107 this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_); … … 109 109 //} 110 110 } 111 111 112 112 /** 113 113 @brief … … 175 175 this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x); 176 176 } 177 177 178 178 }
Note: See TracChangeset
for help on using the changeset viewer.