Search Unity

Screen clipping with my Space Ship

Discussion in '2D' started by Kumacuda, Apr 5, 2015.

  1. Kumacuda

    Kumacuda

    Joined:
    Apr 4, 2015
    Posts:
    1
    So I'm making a practice game that is like those old arcade space bullethells, and I'm trying to keep the ship inside the screen, but no matter what I try to do, half of it clips out of the edge. I'm new to this, so I don't know what I'm doing wrong.

    Currently I have the ship blocked in with 4 cubes, all with Box Collider, and tried with their 2D versions. The ship currently has a Box Collider 2D on it. I'm messed with all the settings and it still doesn't work. So if anyone can explain to me how to do this, or link me to a guide that would be great.
     
  2. PGJ

    PGJ

    Joined:
    Jan 21, 2014
    Posts:
    899
    You must use the same type of collider for all the object. Since this is the 2D forum, I assume that you want the 2D versions. If half the ship is clipped outside the edge, then why don't you move your blocking cubes more towards the center of the screen? That way the ship should get blocked earlier on, and it shouldn't be clipped.