Changeset 6241 in orxonox.OLD for trunk/src/world_entities/space_ships
- Timestamp:
- Dec 21, 2005, 3:36:25 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/space_ship.cc
r6222 r6241 112 112 PRINTF(4)("SPACESHIP INIT\n"); 113 113 114 //EventHandler::getInstance()->grabEvents(true);114 EventHandler::getInstance()->grabEvents(true); 115 115 116 116 bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false; … … 193 193 { 194 194 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 195 this->attachCamera(); 195 196 196 197 … … 200 201 { 201 202 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 203 this->detachCamera(); 202 204 203 205 … … 284 286 285 287 //orient the spaceship in direction of the mouse 286 rotQuat = Quaternion::quatSlerp( this->getAbsDir(), mouseDir,fabsf(time)*3);287 if (this->getAbsDir().distance(rotQuat) > 0.00 1)288 rotQuat = Quaternion::quatSlerp( this->getAbsDir(), mouseDir, fabsf(time)*3.0); 289 if (this->getAbsDir().distance(rotQuat) > 0.00000000000001) 288 290 this->setAbsDir( rotQuat); 289 291 //this->setAbsDirSoft(mouseDir,5); … … 440 442 this->yMouse = event.yRel; 441 443 mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1))); 442 if( xMouse*xMouse + yMouse*yMouse < 0.9)443 this->setAbsDir(mouseDir);444 // if( xMouse*xMouse + yMouse*yMouse < 0.9) 445 //this->setAbsDir(mouseDir); 444 446 } 445 447 }
Note: See TracChangeset
for help on using the changeset viewer.