update
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user