Changeset 7346 in orxonox.OLD for trunk/src/world_entities/space_ships
- Timestamp:
- Apr 19, 2006, 1:17:46 PM (19 years ago)
- Location:
- trunk/src/world_entities/space_ships
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/helicopter.h
r7337 r7346 22 22 23 23 virtual void loadParams(const TiXmlElement* root); 24 virtual void set StartDirection(const Quaternion& rot){/* FIXME */};24 virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f) {/* FIXME */}; 25 25 26 26 virtual void enter(); -
trunk/src/world_entities/space_ships/hover.h
r7337 r7346 19 19 20 20 virtual void loadParams(const TiXmlElement* root); 21 virtual void set StartDirection(const Quaternion& rot) {/* FIXME */};21 virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f) {/* FIXME */}; 22 22 23 23 virtual void enter(); -
trunk/src/world_entities/space_ships/space_ship.cc
r7337 r7346 248 248 } 249 249 250 void SpaceShip::set StartDirection(const Quaternion& quat)250 void SpaceShip::setPlayDirection(const Quaternion& quat, float speed) 251 251 { 252 252 this->mouseDir = quat; -
trunk/src/world_entities/space_ships/space_ship.h
r7337 r7346 27 27 virtual void loadParams(const TiXmlElement* root); 28 28 29 virtual void set StartDirection(const Quaternion& rot);29 virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); 30 30 31 31 virtual void enter(); -
trunk/src/world_entities/space_ships/turbine_hover.cc
r7345 r7346 103 103 this->setClassID(CL_TURBINE_HOVER, "TurbineHover"); 104 104 105 this->setSupportedPlaymodes(Playable::Full3D | Playable::Horizontal );105 this->setSupportedPlaymodes(Playable::Full3D | Playable::Horizontal | Playable::Vertical); 106 106 107 107 this->loadModel("models/ships/hoverglider_wing.obj", 1.0f, 3); … … 393 393 } 394 394 break; 395 396 case Playable::Vertical: 397 { 398 accel.z = 0; 399 Vector accelerationDir = this->getAbsDir().apply(accel * this->acceleration); 400 accelerationDir.z=0; 401 402 // this is the air friction (necessary for a smooth control) 403 Vector damping = (this->velocity * this->airFriction); 404 405 this->velocity += (accelerationDir - damping)* dt; 406 this->shiftCoor (this->velocity * dt); 407 408 this->setRelDirSoft(this->direction * Quaternion(-cameraLook, Vector(0,0,1)), 5); 409 410 this->wingNodeLeft.setRelDirSoft(Quaternion(accel.z * .05 +this->rotation, Vector(1,0,0)), 5); 411 this->rotorNodeLeft.setRelDirSoft(Quaternion(-accel.x * .07+this->rotation + cameraLook, Vector(0,0,1)), 5); 412 413 this->wingNodeRight.setRelDirSoft(Quaternion(accel.z * .05 +this->rotation, Vector(1,0,0)), 5); 414 this->rotorNodeRight.setRelDirSoft(Quaternion(-accel.x*.07 -this->rotation + cameraLook, Vector(0,0,1)), 5); 415 } 416 break; 395 417 } 396 418 } -
trunk/src/world_entities/space_ships/turbine_hover.h
r7339 r7346 22 22 23 23 virtual void loadParams(const TiXmlElement* root); 24 virtual void set StartDirection(const Quaternion& rot) {/* FIXME */};24 virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f) {/* FIXME */}; 25 25 virtual void enter(); 26 26 virtual void leave();
Note: See TracChangeset
for help on using the changeset viewer.