EvadeBehavior class

This steering behavior is is almost the same as {@link PursuitBehavior} except that the agent flees from the estimated future position of the pursuer.

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

Inheritance

Constructors

EvadeBehavior([MovingEntity? pursuer, double panicDistance = 10, double predictionFactor = 1])
Constructs a new arrive behavior.

Properties

active bool
getter/setter pairinherited
displacement Vector3
final
hashCode int
The hash code for this object.
no setterinherited
newPursuerVelocity Vector3
final
panicDistance double
getter/setter pair
path Path
getter/setter pairinherited
predictedPosition Vector3
final
predictionFactor double
getter/setter pair
pursuer MovingEntity?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Vector3
getter/setter pairinherited
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) EvadeBehavior
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) EvadeBehavior
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