OffsetPursuitBehavior class

This steering behavior produces a force that keeps a vehicle at a specified offset from a leader vehicle. Useful for creating formations.

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

Inheritance

Constructors

OffsetPursuitBehavior([Vehicle? leader, Vector3? offset])
Constructs a offset pursuit behavior.

Properties

active bool
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
leader Vehicle?
getter/setter pair
newLeaderVelocity Vector3
final
offset Vector3
latefinal
offsetWorld Vector3
final
path Path
getter/setter pairinherited
predictedPosition Vector3
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Vector3
getter/setter pairinherited
toOffset 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) OffsetPursuitBehavior
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) OffsetPursuitBehavior
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