Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 14, 2015, 10:09:41 PM (8 years ago)
Author:
gania
Message:

Works for DivisionController for now. Almost balanced AI! Dodges bullets (still killable, which is good), but goes crazy when close. So to be destroyed when far away. TODO implement formation flight when not in fight

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/AI_HS15/src/orxonox/controllers/CommonController.h

    r10800 r10803  
    8181
    8282        public:
    83         static const float hardcoded_projectile_speed = 750;
     83            static const float hardcoded_projectile_speed = 750;
    8484
    85             static const float ACTION_INTERVAL = 2.0f;
     85            static const float ACTION_INTERVAL = 1.0f;
    8686
    8787
     
    114114            void setTarget(ControllableEntity* target);
    115115            bool hasTarget();
     116            ControllableEntity* getTarget();
    116117            void setTargetOrientation(const Quaternion& orient);
    117118            void setTargetOrientation(ControllableEntity* target);
     
    123124
    124125        protected:
    125 
     126            void dodge(Vector3& thisPosition, Vector3& diffUnit);
     127            int counter;
    126128            void moveToPoint(const Vector3& relativeTargetPosition, float angleRoll);
    127129            bool moveAndRoll(float dt);
     
    139141            void aimAtTarget();
    140142            bool isLookingAtTarget(float angle) const;
     143            bool isLooking( ControllableEntity* entityThatLooks, ControllableEntity* entityBeingLookedAt, float angle )const;
    141144
    142145            //checks if spaceship points at enemy and if there are allies inbetween
     
    155158            Quaternion targetOrientation_;
    156159
     160            void stopMoving();
    157161            void setPositionOfTarget(const Vector3& target);
    158162            void setOrientationOfTarget(const Quaternion& orient);
     
    164168
    165169            WeakPtr<ControllableEntity> target_;
     170            //WeakPtr<ControllableEntity> thisEntity_;
     171
     172            bool bEngaging_;
    166173            bool bShooting_;
    167174            WeakPtr<ControllableEntity> objectiveTarget_;
    168175
     176            void lookAtTarget(float dt);
     177            void stopLookingAtTarget();
     178            void startLookingAtTarget();
     179            bool bLookAtTarget_;
    169180            void maneuver();
    170181            void chooseManeuverType();
Note: See TracChangeset for help on using the changeset viewer.