godot-portals-plugin-csharp

Portal3D.TeleportRootMeta

By default, the object triggering the teleport gets teleported. You can override this with a metadata property that contains a NodePath.

If the metadata property is set, the node at the path inputted will be teleported instead.

private static readonly StringName TeleportRootMeta = new("TeleportRoot");

Example:

public override void _Ready()
{
	this.SetMeta(TeleportRootMeta, GetParent().GetPath()); // Parent NodePath
}

See Also