Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 10, 2014, 4:06:03 PM (11 years ago)
Author:
muemart
Message:

Limit turret's rotation (another method…), work a bit on the controller, and make a (ugly?) hack to allow attaching dynamic objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/turretFS14/src/modules/objects/Turret.h

    r10021 r10031  
    3737
    3838#include "objects/ObjectsPrereqs.h"
    39 #include "OgreQuaternion.h"
    40 
    41 #include "worldentities/pawns/SpaceShip.h"
     39#include "worldentities/pawns/Pawn.h"
    4240
    4341namespace orxonox
     
    5654            virtual void tick(float dt);
    5755
     56            virtual bool isInRange(Vector3 position);
     57
    5858            inline void setMaxPitch(Ogre::Real pitch)
    5959                {this->maxPitch_ = pitch;}
     
    6868                {return this->maxYaw_;}
    6969
     70            inline void setAttackRadius(float radius)
     71                {this->attackRadius_ = radius;}
     72
     73            inline float getAttackRadius()
     74                {return this->attackRadius_;}
     75
     76
    7077        private:
    7178            bool gotOrient_;
    7279            Ogre::Real maxPitch_;
    7380            Ogre::Real maxYaw_;
    74             Quaternion startOrientInv_;
     81            float attackRadius_;
     82            Quaternion startOrient_;
     83            Vector3 startDir_;
     84            Vector3 localZ_;
     85            Vector3 localY_;
     86            Vector3 localX_;
    7587            float rotationThrust_;
    7688
    7789            btVector3 localAngularAcceleration_;
    78 
    79             Ogre::Real boundBetween(float val, float lowerBound, float upperBound);
    8090    };
    8191}
Note: See TracChangeset for help on using the changeset viewer.