Coding Adventure: Portals
Video Statistics and Information
Channel: Sebastian Lague
Views: 899,038
Rating: 4.9843454 out of 5
Keywords: unity3d, programming, game development, videogame, tutorial
Id: cWpFZbjtSQg
Channel Id: undefined
Length: 16min 6sec (966 seconds)
Published: Fri Feb 07 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
First time seeing one of this guy's videos and it's extremely well done.
Amazing how far a little math can go. For enter/exit detection, I probably would have done some collision boxes, and pulled out most of my hair trying to get it working.
I tried doing this some years ago, and I went through pretty much the same steps of discovery and implementation, to create a similarly functioning demo.
I found that solving for the actual physics of portals was more difficult than the rendering: If you have an object, managed by the physics engine, transitioning from one portal to another, you need to properly resolve the potential interactions with objects from both sides. You can't simply make a clone, because, to avoid a myriad of physics glitches, all the relevant forces need to be applied to a single object.
You really need to have a physics engine that allows fairly low level hooks into how contact points are generated, and processed, so that you can create two "shells" that could be merged into a single shape and body, before the force resolution step is executed.
The engine I was working with didn't seem to offer this kind of access (as far as I can remember), so that's where I stopped.
I'm barely past "Hello World", and this video is phenomenal! Wayyy above my comprehension level, but it's incredibly illuminating seeing a real programmer working and explaining the relationship between the code and the physical environment. It's also fascinating seeing the mechanics behind portals!
I loove his videos, he also has his code on a public github repository if you guys wanna tinker with it
Now I'm curious about whether Portal's implementation is similar to this, since it also involves fairly complex physics interactions through the portals.
This guy deserves all the subscribers! His content is amazing and of very high quality
Looks like the guy watched this video: https://www.youtube.com/watch?v=_SmPR5mvH7w
Gosh! It was so cool!