mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-11-14 04:57:19 +01:00
Setup call for _apply_steering().
This commit is contained in:
parent
e2da64212e
commit
4f5eb0a3a1
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user