Polarith AI
1.8
Wander

front-end / back-end: AIMWander | Wander
inherits from: AIMSteeringBehaviour | SteeringBehaviour

A behaviour that is used to add some randomness to an agent's movement. A typical use case is an agent that should wander around when it is in some idle state.

The behaviour manipulates the ResultDirection such that the magnitude maximum deviates from the current forward direction in a random angle. The random angle is given by (AngleDeviationLowerLimit, AngleDeviation) for both positive and negative sign. In a random interval of (TimeDeviationLowerLimit, TimeDeviation) the behaviour makes a random decision. It either decides to stay steady or to choose a random angle as described until the next decision.

AIMWander is applicable for both general 3D and planar 2D or 3D scenarios. Use the parameter PlanarMappingType to change the mode accordingly.

Properties

This component has got the following specific properties.

Property Description
PlanarMappingType None: All degrees of freedom, used for general 3D scenarios. Automatic: Based on the Sensor, the behaviour chooses the right planar mode. PlaneXY: Used for planar 2D scenarios. PlaneXZ: Used for planar 3D scenarios.
AngleDeviationLowerLimit The lower limit of the randomly generated angles. (AngleDeviationLowerLimit, AngleDeviation)
AngleDeviation The upper limit of the randomly generated angles. (AngleDeviationLowerLimit, AngleDeviation)
TimeDeviationLowerLimit The minimum time it may take to make the next random decision. (TimeDeviationLowerLimit, TimeDeviation)
TimeDeviation The maximum time it may take to make the next random decision. (TimeDeviationLowerLimit, TimeDeviation)

Preview

Remarks

AIMWander is very easy to use since it does not need any environment configuration.

If no velocity source is present (Rigidbody, AIMSteeringTag), it is helpful to use the PresetVelocity to ensure that AIMWander always has a valid forward direction. Otherwise, it uses the first receptor of the corresponding AIMSensor as a fallback.

PlanarMappingType is ignored if your sensor is not planar at all. (E.g. the circle and line sensor are planar while the sphere sensor is not.)

Using AIMPlanarInterpolation significantly improves the results of this behaviour.

Imprint