/2DCamera

Unity Project - 2D Controller with edge of screen detection camera control

Primary LanguageC#

2D Camera

This was an exercise to setup a camera to follow an object when it approaches the edge of the screen and have the camera follow that object as it "pushes" up against the edge.

How it works

When the player object is within 0.1 units of any edge of the screen, the camera will stick with the player in that direction.

Credit

If you use this in a project, I'd ask that you drop me an email at leonard4@gmail.com saying Thanks! or crediting me somewhere, I don't really care but would be nice to hear if you use this! :)