20 const float _rotation;
24 explicit Wander(
const std::string& parameter) :
25 ISteering(), _rotation(parameter.empty() ? ai::toRadians(10.0f) : Str::strToFloat(parameter)) {
29 const float orientation = ai->getCharacter()->getOrientation();
30 const glm::vec3& v = fromRadians(orientation);
31 const MoveVector d(v * speed, ai::randomBinomial() * _rotation);
Definition: MoveVector.h:10
Moves forward in the direction the character is currently facing into.
Definition: Wander.h:18
Defines some basic movement algorithms like Wandering, Seeking and Fleeing.
Steering interface.
Definition: Steering.h:47
MoveVector execute(const AIPtr &ai, float speed) const override
Calculates the MoveVector.
Definition: Wander.h:28