Changeset 10731 in orxonox.OLD for branches/presentation/src/world_entities/space_ships
- Timestamp:
- Jun 20, 2007, 2:00:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/space_ships/space_ship.cc
r10730 r10731 588 588 this->xMouse += event.xRel; 589 589 this->yMouse += event.yRel; 590 // printf("Mouse Coord: %f, %f\n", this->xMouse, this->yMouse); 590 // printf("Mouse Coord: %f, %f\n", this->xMouse, this->yMouse); 591 592 float maxMouseDist = 75.1; 593 #define sqr(a) ((a)*(a)) 594 float mouseDist = sqrt( sqr(0.6*xMouse) + sqr(yMouse) ); 595 596 if ( mouseDist > maxMouseDist ) 597 { 598 xMouse /= mouseDist/maxMouseDist; 599 yMouse /= mouseDist/maxMouseDist; 600 } 601 591 602 this->weaponMan.getFixedTarget()->setRelCoor(100000, -100 * this->mouseSensitivity * yMouse, 100 * this->mouseSensitivity * xMouse); 592 603 this->secWeaponMan.getFixedTarget()->setRelCoor(50000, -50 * this->mouseSensitivity * yMouse, 50 * this->mouseSensitivity * xMouse);
Note: See TracChangeset
for help on using the changeset viewer.