- Timestamp:
- Apr 17, 2006, 2:45:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/hover.cc
r7221 r7327 291 291 292 292 this->shiftCoor (this->velocity * dt); 293 this->rotation = 0.0f; 293 294 // limit the maximum rotation speed. 295 if (this->rotation != 0.0f) 296 { 297 float maxRot = 10.0 * dt; 298 if (unlikely(this->rotation > maxRot)) this->rotation = maxRot; 299 if (unlikely(this->rotation < -maxRot)) this->rotation = -maxRot; 300 this->direction *= Quaternion(-M_PI/4.0*this->rotation, Vector(0,1,0)); 301 this->rotation = 0.0f; 302 } 294 303 295 304 this->setRelDirSoft(this->direction * Quaternion(-cameraLook, Vector(0,0,1)), 5); … … 381 390 382 391 // rotate the Player around the y-axis 383 this->direction *= Quaternion(-M_PI/4.0*xMouse, Vector(0,1,0));384 392 this->rotation += xMouse; 385 393
Note: See TracChangeset
for help on using the changeset viewer.