InterposeBehavior class

This steering behavior produces a force that moves a vehicle to the midpoint of the imaginary line connecting two other agents.

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

Inheritance

Constructors

InterposeBehavior([MovingEntity? entity1, MovingEntity? entity2, double deceleration = 3])
Constructs a interpose behavior.

Properties

active bool
getter/setter pairinherited
deceleration double
getter/setter pair
entity1 MovingEntity?
getter/setter pair
entity2 MovingEntity?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
midPoint Vector3
final
path Path
getter/setter pairinherited
predictedPosition1 Vector3
final
predictedPosition2 Vector3
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Vector3
getter/setter pairinherited
translation 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) InterposeBehavior
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) InterposeBehavior
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