Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2009, 11:21:40 AM (16 years ago)
Author:
rgrieder
Message:

Resolved projectile targeting problem by introducing a ClassTreeMask. It's a bit hacky but currently I don't see another quick way.
There is a problem though: The weapons aim into other directions while rolling the space ship…
I just couldn't figure it out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/steering/src/orxonox/weaponsystem/WeaponMode.h

    r6045 r6055  
    3838#include "core/SubclassIdentifier.h"
    3939#include "tools/Timer.h"
    40 
    41 #include "weaponsystem/Weapon.h"
    42 #include "weaponsystem/WeaponPack.h"
    43 #include "weaponsystem/WeaponSystem.h"
    44 #include "worldentities/pawns/Pawn.h"
    45 #include "controllers/Controller.h"
    4640
    4741namespace orxonox
     
    115109                { return this->muzzleOffset_; }
    116110
    117             Vector3 getMuzzlePosition() const;
    118             const Quaternion& getMuzzleOrientation() const;
     111            void computeMuzzleParameters();
     112            const Vector3& getMuzzlePosition() const
     113                { return this->muzzlePosition_; }
     114            const Quaternion& getMuzzleOrientation() const
     115                { return this->muzzleOrientation_; }
    119116            Vector3 getMuzzleDirection() const;
    120117
     
    131128                { return this->mode_; }
    132129
    133             inline Vector3 getTarget()
    134                 { return this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getController()->getTarget(); }
     130            Vector3 getTarget();
    135131
    136132        protected:
     
    161157            Timer reloadTimer_;
    162158            bool bReloading_;
     159
     160            Vector3 muzzlePosition_;
     161            Quaternion muzzleOrientation_;
    163162    };
    164163}
Note: See TracChangeset for help on using the changeset viewer.