-
Notifications
You must be signed in to change notification settings - Fork 5
Portal Trigger Collider
Each portal must have a trigger collider on it which is used to detect when players or objects are able to pass through the portal. The trigger must extend a short distance (about 1-2m is normally fine) in front and behind the portal, however it must not extend AT ALL off the sides of the portal, horizontally or vertically. The portal teleports the player when crossing the portal surface while their head is in the trigger collider, so if the trigger extends off the sides, the portal may teleport the player when they're only walking nearby it.
If you expect players or objects to be traveling very fast through the portal, such as in an infinite-fall situation, you will need to make the trigger longer. Otherwise, the player may move fast enough to pass all the way through the trigger in a single frame, making the portal not detect them. For example, if you have an infinite fall, I suggest extending the trigger of the bottom portal to go all the way up to the top portal, and significantly below the portal too, so that the player never leaves the trigger while falling.