Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2005, 4:18:16 PM (20 years ago)
Author:
snellen
Message:

guided_missile.cc in /world_entities/weapon updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc

    r6114 r6131  
    269269 
    270270  //orient the spaceship in direction of the mouse
    271    Quaternion rotQuat = Quaternion::quatSlerp( this->getAbsDir(),mouseDir,fabsf(time));
     271   rotQuat = Quaternion::quatSlerp( this->getAbsDir(),mouseDir,fabsf(time)*3);
    272272   if (this->getAbsDir().distance(rotQuat) > 0.001) 
    273      this->setAbsDir( Quaternion::quatSlerp( this->getAbsDir(),mouseDir,fabsf(time)));
     273    this->setAbsDir( rotQuat);
    274274   //this->setAbsDirSoft(mouseDir,5);
    275275   
     
    423423    this->yMouse = event.yRel;
    424424    mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1)));
    425    
     425    if( xMouse*xMouse + yMouse*yMouse < 0.9)
     426     this->setAbsDir(mouseDir);
    426427  }
    427428}
Note: See TracChangeset for help on using the changeset viewer.