This commit is contained in:
Nikolai Fesenko
2025-08-21 19:32:40 +02:00
parent a0efc6b9b8
commit e32a58f416
10 changed files with 105 additions and 5 deletions

View File

@@ -79,18 +79,22 @@ func set_target_position():
var newPos = target_object.global_position
newPos.y = self.position.y
nav_agent.target_position = newPos
print(target_object.can_be_used())
#nav_agent.target_position = start_pos
func _on_navigation_agent_3d_target_reached() -> void:
if target_object != null:
print("I reached a target")
is_target_reached = true
nav_agent.target_position = self.global_position
Global.interact.emit(self, target_object)
pass
func set_timer(time):
timer.wait_time = time
timer.one_shot = true
timer.start()
func _on_timer_timeout() -> void:
if action != null: