ObstacleAvoidanceBehavior class

This steering behavior produces a force so a vehicle avoids obstacles lying in its path.

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

Inheritance

Constructors

ObstacleAvoidanceBehavior([List<GameEntity>? obstacles])
Constructs a obstacle avoidance behavior.

Properties

active bool
getter/setter pairinherited
boundingSphere BoundingSphere
final
brakingWeight double
getter/setter pair
dBoxMinLength double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
intersectionPoint Vector3
final
inverse Matrix4
final
localPositionOfClosestObstacle Vector3
final
localPositionOfObstacle Vector3
final
obstacles List<GameEntity>
latefinal
path Path
getter/setter pairinherited
ray Ray
final
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) ObstacleAvoidanceBehavior
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) ObstacleAvoidanceBehavior
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