PursuitBehavior class

This steering behavior is useful when an agent is required to intercept a moving agent.

@author {@link https://github.com/Mugen87|Mugen87}

Inheritance

Constructors

PursuitBehavior([MovingEntity? evader, double predictionFactor = 1])
Constructs a pursuit behavior.

Properties

active bool
getter/setter pairinherited
displacement Vector3
final
evader MovingEntity?
getter/setter pair
evaderDirection Vector3
final
hashCode int
The hash code for this object.
no setterinherited
newEvaderVelocity Vector3
final
path Path
getter/setter pairinherited
predictedPosition Vector3
final
predictionFactor double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Vector3
getter/setter pairinherited
vehicleDirection 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) PursuitBehavior
Restores this instance from the given JSON object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveReferences(Map<String, GameEntity> entities) PursuitBehavior
Restores UUIDs with references to GameEntity objects.
override
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