ArriveBehavior class

This steering behavior produces a force that directs an agent toward a target position. Unlike {@link SeekBehavior}, it decelerates so the agent comes to a gentle halt at the target position.

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

Inheritance

Constructors

ArriveBehavior([Vector3? target, double deceleration = 3, double tolerance = 0])
Constructs a new arrive behavior.

Properties

active bool
getter/setter pairinherited
deceleration double
getter/setter pair
desiredVelocity Vector3
final
displacement Vector3
final
hashCode int
The hash code for this object.
no setterinherited
path Path
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Vector3
getter/setter pairinherited
tolerance double
getter/setter pair
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) ArriveBehavior
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) 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