Search Unity

Limiting gamespace with a boundary

Discussion in 'Physics' started by Ezrick, Jan 31, 2016.

  1. Ezrick

    Ezrick

    Joined:
    May 15, 2013
    Posts:
    8
    Hi forums,

    So I am having trouble finding a solution. I have a player object, a ship in this case, and move it by applying forces. I have a boundary set up like the Space Shooter tutorial. There are two issues that this causes.

    The first issue is that the screen will shake when the ship is against the boundary. I believe this is caused by the ship moving outside the boundary and then being moved back.

    The second issue is that the boundary does not reduce or modify the forces on the object, just the position. I can continue to add force to the ship.

    I am trying to find a solution that will contain the ship within the boundary and add counter force in the appropriate vector.