Fix teleporting from teleportals that are nested in a node, by using global position rather than relative position.
ci/woodpecker/push/woodpecker Pipeline was canceled

This commit is contained in:
yagigreg committed 2026-10-18 20:34:31 -05:00
1 parent a673218fa9
commit 0a2c8211fd
1 file changed
+1 -1
+1 -1
View File
@@ -35,7 +35,7 @@ func _on_contact(body) -> void:
%Player2D.get_node("Camera2D").position_smoothing_enabled = false
if %Player2D.teleport_cooldown > 0:
return
body.set_position(teleporter.get_position())
body.set_position(teleporter.global_position)
%Player2D.on_teleport()
disable()
await get_tree().create_timer(cooldown).timeout