Added window boundary collision.