FollowPathBehavior class

This steering behavior produces a force that moves a vehicle along a series of waypoints forming a path.

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

Inheritance

Constructors

FollowPathBehavior([Path? path, double nextWaypointDistance = 1])
Constructs a new follow path behavior.

Properties

active bool
getter/setter pairinherited
arrive ArriveBehavior
no setter
hashCode int
The hash code for this object.
no setterinherited
nextWaypointDistance double
getter/setter pair
path Path
latefinaloverride
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) FollowPathBehavior
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