20 explicit TargetFlee(
const std::string& parameters) :
22 _target = parse(parameters);
25 inline bool isValid ()
const {
26 return !isInfinite(_target);
33 const glm::vec3& v = glm::normalize(ai->getCharacter()->getPosition() - _target);
34 const float orientation = angle(v);
Definition: MoveVector.h:10
Flees from a particular target.
Definition: TargetFlee.h:14
virtual MoveVector execute(const AIPtr &ai, float speed) const override
Calculates the MoveVector.
Definition: TargetFlee.h:29
Defines some basic movement algorithms like Wandering, Seeking and Fleeing.
Steering interface.
Definition: Steering.h:47