Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2015, 1:41:26 PM (8 years ago)
Author:
gania
Message:

fixed library dependencies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/FlyingController.cc

    r10871 r10875  
    2929#include "core/XMLPort.h"
    3030#include "worldentities/pawns/SpaceShip.h"
     31#include "util/Math.h"
    3132
    3233namespace orxonox
     
    128129    void FlyingController::copyOrientation( const Quaternion& orient, float dt )
    129130    {
    130         //roll angle difference in radian
    131         float diff=orient.getRoll(false).valueRadians() -
     131
     132        double diff=orient.getRoll(false).valueRadians() -
    132133                        ( this->getControllableEntity() ->getOrientation() .getRoll( false ).valueRadians() );
    133         while( diff>math::twoPi )diff-=math::twoPi;
     134        while( diff>math::twoPi)diff-=math::twoPi;
    134135        while( diff<-math::twoPi )diff+=math::twoPi;
    135         this->getControllableEntity() ->rotateRoll( diff*0.2f*ROTATEFACTOR * dt );
     136
     137        this->getControllableEntity() ->rotateRoll(diff * ROTATEFACTOR * dt);
    136138    }
     139    //change log: increased precision, increased rotation speed
    137140    void FlyingController::copyTargetOrientation( float dt )
    138141    {
Note: See TracChangeset for help on using the changeset viewer.