Changeset 7326 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Apr 17, 2006, 2:42:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/turbine_hover.cc
r7221 r7326 331 331 332 332 this->velocity += (accelerationDir - damping)* dt; 333 334 333 this->shiftCoor (this->velocity * dt); 335 this->rotation = 0.0f; 334 335 // limit the maximum rotation speed. 336 if (this->rotation != 0.0f) 337 { 338 float maxRot = 10.0 * dt; 339 if (unlikely(this->rotation > maxRot)) this->rotation = maxRot; 340 if (unlikely(this->rotation < -maxRot)) this->rotation = -maxRot; 341 this->direction *= Quaternion(-M_PI/4.0*this->rotation, Vector(0,1,0)); 342 343 this->rotation = 0.0f; 344 } 336 345 337 346 this->setRelDirSoft(this->direction * Quaternion(-cameraLook, Vector(0,0,1)), 5); … … 421 430 422 431 // rotate the Player around the y-axis 423 this->direction *= Quaternion(-M_PI/4.0*xMouse, Vector(0,1,0));424 432 this->rotation += xMouse; 425 433
Note: See TracChangeset
for help on using the changeset viewer.