Setup call for _apply_steering().

This commit is contained in:
Relintai 2023-01-13 19:57:36 +01:00
parent e2da64212e
commit 4f5eb0a3a1
8 changed files with 9 additions and 7 deletions

View File

@ -15,7 +15,7 @@ func _init() -> void:
func _physics_process(delta: float) -> void:
arrive.calculate_steering(_accel)
agent._apply_steering(_accel, delta)
agent.apply_steering(_accel, delta)
func setup(

View File

@ -31,7 +31,7 @@ func _physics_process(delta: float) -> void:
target.position = target_node.transform.origin
target.position.y = transform.origin.y
blend.calculate_steering(accel)
agent._apply_steering(accel, delta)
agent.apply_steering(accel, delta)
func setup(

View File

@ -51,7 +51,7 @@ func _physics_process(delta: float) -> void:
target.position.y = agent.position.y + _direction.y * _radius
priority.calculate_steering(_accel)
agent._apply_steering(_accel, delta)
agent.apply_steering(_accel, delta)
func setup(

View File

@ -21,7 +21,7 @@ func _ready() -> void:
func _physics_process(delta: float) -> void:
face.calculate_steering(_accel)
agent._apply_steering(_accel, delta)
agent.apply_steering(_accel, delta)
func _draw() -> void:

View File

@ -46,7 +46,7 @@ func setup(
func _physics_process(delta: float) -> void:
if _valid:
follow.calculate_steering(_accel)
agent._apply_steering(_accel, delta)
agent.apply_steering(_accel, delta)
func _on_Drawer_path_established(points: Array) -> void:

View File

@ -62,7 +62,7 @@ func _draw() -> void:
func _physics_process(delta: float) -> void:
if blend:
blend.calculate_steering(acceleration)
agent._apply_steering(acceleration, delta)
agent.apply_steering(acceleration, delta)
func set_neighbors(neighbor: Array) -> void:

View File

@ -39,4 +39,4 @@ func _physics_process(delta: float) -> void:
else:
flee.calculate_steering(accel)
agent._apply_steering(accel, delta)
agent.apply_steering(accel, delta)

View File

@ -32,6 +32,8 @@ var angular_drag_percentage : float = 0.0
var _last_orientation : float = 0.0
var _applied_steering : bool = false
func apply_steering(_acceleration : GSAITargetAcceleration, _delta : float) -> void:
call("_apply_steering", _acceleration, _delta)
# Moves the agent's body by target `acceleration`.
# @tags - virtual