Extends: GSAISteeringAgent < GSAIAgentLocation
A base class for a specialized steering agent that updates itself every frame so the user does not have to. All other specialized agents derive from this.
Type | Name |
---|---|
bool | calculate_velocities |
bool | apply_linear_drag |
bool | apply_angular_drag |
float | linear_drag_percentage |
float | angular_drag_percentage |
Type | Name |
---|---|
void | func _apply_steering(_acceleration: GSAITargetAcceleration, _delta: float) -> void |
var calculate_velocities: bool
If true
, calculates linear and angular velocities based on the previous
frame. When false
, the user must keep those values updated.
var apply_linear_drag: bool
If true
, interpolates the current linear velocity towards 0 by the
linear_drag_percentage
value.
Does not apply to RigidBody
and RigidBody2D
nodes.
var apply_angular_drag: bool
If true
, interpolates the current angular velocity towards 0 by the
angular_drag_percentage
value.
Does not apply to RigidBody
and RigidBody2D
nodes.
var linear_drag_percentage: float
The percentage between the current linear velocity and 0 to interpolate by if
apply_linear_drag
is true.
Does not apply to RigidBody
and RigidBody2D
nodes.
var angular_drag_percentage: float
The percentage between the current angular velocity and 0 to interpolate by if
apply_angular_drag
is true.
Does not apply to RigidBody
and RigidBody2D
nodes.
func _apply_steering(_acceleration: GSAITargetAcceleration, _delta: float) -> void
Moves the agent’s body by target acceleration
.