Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | m5ables |
extends Area
export(NodePath) var teleport_enter = null
func _on_Teleport1_body_entered(body):
if body.is_in_group("teleport_player"):
get_tree().call_group("teleport_player" , "teleport" ,get_node(teleport_enter).transform)
print("teleport")
func _on_Teleport2_body_exited(body):
if body.is_in_group("teleport_player"):
get_tree().call_group("teleport_player" , "teleport" , get_node(teleport_enter))
and player
func teleport(target_pos):
transform = target_pos
print("ok")