20 explicit GroupSeek(
const std::string& parameters) :
22 _groupId = ::atoi(parameters.c_str());
25 inline bool isValid ()
const {
26 return _groupId != -1;
30 const Zone* zone = ai->getZone();
31 if (zone ==
nullptr) {
34 const glm::vec3& target = zone->getGroupMgr().getPosition(_groupId);
35 if (isInfinite(target)) {
38 const glm::vec3& v = glm::normalize(target - ai->getCharacter()->getPosition());
39 const float orientation = angle(v);
Definition: MoveVector.h:10
Defines some basic movement algorithms like Wandering, Seeking and Fleeing.
virtual MoveVector execute(const AIPtr &ai, float speed) const override
Calculates the MoveVector.
Definition: GroupSeek.h:29
Steering interface.
Definition: Steering.h:47
Seeks a particular group.
Definition: GroupSeek.h:14