mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-12-24 05:37:15 +01:00
parent
5627a5636a
commit
18931a9623
@ -33,6 +33,10 @@ func _calculate_steering(acceleration: GSTTargetAcceleration) -> void:
|
||||
var distance := path.calculate_distance(location)
|
||||
var target_distance := distance + path_offset
|
||||
|
||||
if prediction_time > 0 and path.is_open:
|
||||
if target_distance < path.calculate_distance(agent.position):
|
||||
target_distance = path.length
|
||||
|
||||
var target_position := path.calculate_target_position(target_distance)
|
||||
|
||||
if is_arrive_enabled and path.is_open:
|
||||
|
Loading…
Reference in New Issue
Block a user