Before updating to Windows 10 you may need to return your Pro license. More information here

Constrain camera's view area


I am developing a platformer with 2D gameplay and have a camera script set up that nicely follows the player character. Now, I would like to constrain this following movement:

  • If the player falls into a hole, the camera shouldn't follow, but let him fall out of the field of view.

  • If the level has an upper bound (like in tunnel), the amount visible above should be constrained, too.

For this, I need some kind of way to limit the camera's field of view to specific lower/upper bounds, ideally in a way that is independent of the camera's distance to the player (independent as in "allows for the camera distance to change and still work"). Is there a way to accomplish this with Unity?

more ▼

asked Apr 17, 2011 at 05:50 PM

avatar image

Denis Washington
1 3 2 2

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Apr 17, 2011 at 05:50 PM

Seen: 1325 times

Last Updated: Apr 17, 2011 at 05:50 PM