Getting actor's relative (to a volume) location - how ?

Here is the setup I am thinking of - 2 identical volumes located far apart in the world. Player enters one volume and gets teleported into second volume, into exact same spot as he entered in the first volume.

How would I do that ?

Thanks

P.S. Something like that and vice versa:

I feel like there’s probably a better way to do this but I’m not great at vector math so here’s what I think should work off the top of my head:

Volume1Location - PlayerLocation = DirectionFromVolume1Origin

Length of DirectionFromVolume1Origin = DistanceFromOrigin

Teleport player to Volume2Location + (DirectionFromVolume1Origin*DistanceFromOrigin)

If Volume2 has a different rotation than volume 1, then you may need to rotate the DirectionFromVolumeOrigin vector before you do the last step.

You’re going to want to use the Inverse Transform node. This allows you to transform from what’s known as ‘world space’ to ‘local space’. Now what you’re trying to do is go from a local space in volume A, to the identical local space in volume B. So you’ll want to find out your player’s transform in local space of volume A (this is the offset between you and that volume). You then set your players position = world transform of volume B + your newly discovered offset from the volume. You will be brought to the same local location of the second volume. :slight_smile:

Hope this helps, PM or post if u need help using that node. +1 is appreciated