Question by
a1b2c4 · Aug 15, 2017 at 07:35 PM ·
camera2dstopspace shooter
How do I keep a player within the camera area. 2D.
So I am programming a 2D, top down game using an Orthographic camera. It will be a space shooter. Anyway I'm trying to keep my ship within the bounds of my camera (x= -2.5 to 2.5, y= -2.5 to 2.5) and I can't find a way to do this that works. Anyone have any Ideas? Also I am fairly new to Unity but I can keep my pace.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612132802im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Keeping player within screenbounds with moving camera (Vertical Shooter) 2 Answers
Camera and UI settings for aspect ratio independent 2D game 1 Answer
Preventing Objects from being pixelated in play mode. 0 Answers
When playing builded version of game the cameras only captures part of scene. 0 Answers
Pixel Perfect with Height constant 0 Answers