Reposition the player relative to which part of the collider it hit for endless hall?
I'm trying to make an endless hall by having two colliders, one the trigger that repositions you and one for the target. The target can also be the trigger and vice versa, since it works like a portal system. I check if a bool is false when I enter the trigger, then I just set a bool true on the target and set it to false when I exit the target collider (to stop loop repositioning). The problem I'm having is making the player reposition to the target collider but offset to the part they hit on the trigger collider. If the colliders are the same size, is there a way of checking which part of the collider they're touching and when moving to the new collider, retain that offset so the repositioning matches perfectly?
Answer by Zebbi · May 12, 2020 at 08:16 AM
This is the correct way of doing this: https://answers.unity.com/questions/1118179/portals-transform-rotation-of-ported-objects.html