Changeset 6080
- Timestamp:
- Nov 17, 2009, 11:54:32 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/particles2/src/modules/weapons/projectiles/Rocket.cc
r6079 r6080 111 111 112 112 this->originalControllableEntity_ = this->owner_->getPlayer()->getControllableEntity(); 113 this->originalControllableEntity_->setDestroyWhenPlayerLeft( false ); 113 114 this->owner_->getPlayer()->startControl(this); 114 115 } … … 125 126 126 127 this->setAngularVelocity(this->localAngularVelocity_); 128 this->setVelocity( (this->getOrientation()*WorldEntity::FRONT)*100 ); 129 this->localAngularVelocity_ = 0; 130 // this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxilaryThrust_); 131 // this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxilaryThrust_); 132 // if (this->localLinearAcceleration_.z() > 0) 133 // this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxilaryThrust_); 134 // else 135 // this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_); 136 // this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_); 137 // this->localLinearAcceleration_.setValue(0, 0, 0); 138 // 139 // this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_; 140 // this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_); 127 141 } 128 142 … … 181 195 void Rocket::rotateYaw(const Vector2& value) 182 196 { 183 this->localAngularVelocity_. y= value.x;197 this->localAngularVelocity_.x = value.x; 184 198 } 185 199 … … 192 206 void Rocket::rotatePitch(const Vector2& value) 193 207 { 194 this->localAngularVelocity_. x= value.x;208 this->localAngularVelocity_.y = value.x; 195 209 } 196 210
Note: See TracChangeset
for help on using the changeset viewer.