void OnCollisionEnter(Collision collision) { if (PhotonView.isMine == false) { return; } if (collision.collider.tag == "Obstacle") { //The ship should bounce back from the terrain a little bit. Otherwise it would just //move forward into the obstacle ShipMovement.AddImpact(collision.contacts[0].normal); Ship.DealDamage(10, null); } }