AlignmentBehavior class

This steering behavior produces a force that keeps a vehicle’s heading aligned with its neighbors.

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

Inheritance

Constructors

AlignmentBehavior()

Properties

active bool
getter/setter pairinherited
averageDirection Vector3
final
direction 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
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) SteeringBehavior
Restores this instance from the given JSON object.
inherited
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.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited