WanderBehavior class
This steering behavior produces a steering force that will give the impression of a random walk through the agent’s environment. The behavior only produces a 2D force (XZ).
@author {@link https://github.com/Mugen87|Mugen87}
- Inheritance
-
- Object
- SteeringBehavior
- WanderBehavior
Constructors
- WanderBehavior([double radius = 1, double distance = 5, double jitter = 5])
- Constructs a new wander behavior.
Properties
- active ↔ bool
-
getter/setter pairinherited
- distance ↔ double
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- jitter ↔ double
-
getter/setter pair
- path ↔ Path
-
getter/setter pairinherited
- radius ↔ double
-
getter/setter pair
- randomDisplacement → Vector3
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- target ↔ Vector3
-
getter/setter pairinherited
- targetWorld → Vector3
-
final
- weight ↔ double
-
getter/setter pairinherited
Methods
-
calculate(
Vehicle vehicle, Vector3 force, [double? delta]) → Vector3 -
Calculates the steering force for a single simulation step.
override
-
fromJSON(
Map< String, dynamic> json) → WanderBehavior -
Restores this instance from the given JSON object.
override
-
generateRandomPointOnCircle(
double radius, Vector3 target) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveReferences(
Map< String, GameEntity> entities) → SteeringBehavior? -
Restores UUIDs with references to GameEntity objects.
inherited
-
toJSON(
) → Map< String, dynamic> -
Transforms this instance into a JSON object.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited