A Portal project made in Unity. Can be used and modified freely according to the MIT license.
Portal:
- Seamless character movement and camera rendering through portals
- Can transforms position, rotation and scale
- Portals can target themselve as a destionation
- Seamless directional lighting through portals
- Raycast through portals
Basic character controller:
- Can be rotated in any direction
- Quake strafe jump
- Counter Strike air control / surf
- Grab object
- Unity 2021 or 2022 (didn't test with other versions of Unity)
- Unity's built-in render pipeline
- URP and HDRP
- Shadows through portals
- Sound through portals
- Animation synchronization between teleportable object and clone
- Moving portals (need to recompute portal corners and bounds)
- Anti aliasing generate artifact on the portal edges
- Renderer of TeleportableObject/Clone in a portal is not clipped and can be seen on the backside of a portal
- Collider of TeleportableObject/Clone in a portal exists and can collide with other stuff on the backside of the portal
- High speed objects can go through portals without being teleported
- Seamless lighting not perfect for some material/shader (Unity's Standard shader for exemple)
- Some time this error shows up: Screen position out of view frustum
- Can't held an object through multiple portals
- TeleportableObject don't handle being in multiple portal triggers simultaneously (if 2 portals are close enough)
- The camera near clip can clip with portal mesh when scaled up



