https://github.com/sunsided/unity-portals-experiment
Toying around with portals in Unity.
https://github.com/sunsided/unity-portals-experiment
portals rendering unity unity3d
Last synced: about 2 months ago
JSON representation
Toying around with portals in Unity.
- Host: GitHub
- URL: https://github.com/sunsided/unity-portals-experiment
- Owner: sunsided
- License: mit
- Created: 2020-02-09T15:34:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T11:21:11.000Z (over 6 years ago)
- Last Synced: 2025-04-07T03:47:57.437Z (about 1 year ago)
- Topics: portals, rendering, unity, unity3d
- Language: C#
- Size: 86.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Playing with Portals
An attempt at re-implementing [Sebastian Lague's
Coding Adventures: Portals](https://www.youtube.com/watch?v=cWpFZbjtSQg).

## Implemented features
- Rendering of portals (only) when in view, and
- Teleportation between portals.
## Missing features
- Recursive portal rendering,
- Momentum, a function of mass and velocity, is conserved between portals;
in layman's terms: Speedy thing goes in, speedy thing comes out.
## Current issues
- So far, rendering the portals works eratically, with the player
being either not relocated at all or being moved too far.
In essence, while "ownership" of the player is transferred to the
linked portal, the location isn't updated. This might be an
issue with the FPS controller used, and further investigation is needed.
- Portals are being rendered too late which results in a lagged update.
This can be observed by moving the view quickly when close to a portal;
the portal's "screen" then seems to wander around.
## Open ideas
- Limiting the portal's own cameras to only rendering the scene
visible _through_ the portal. Right now, the whole view is rendered
and then projected onto the portal; instead, fiddling with the
camera's frustum or using clipping by fiddling with the Z buffer
may improve performance.
## Third-party packages
- [dantogno's First Person Character Controller](https://github.com/dantogno/first-person-character-controller),
an FPS controller based on Cinemachine.