Hey! So I created this teleporter in my 2D platformer and I would like the player stay on the block after teleporter, not spawn next to it, but I don’t know how.
This code is from my player code:
Teleporter
func Teleport(area):
for portal in get_tree().get_nodes_in_group(“portal”):
if portal != area:
if(portal_id == area.id):
if(!portal.lockPortal):
area.LockedPortal()
global_position = portal.global_position
Seems like that could do it. Maybe you still want your root to be at the player’s feet though, so they teleport on top of the teleporter, rather than inside it. Like this: