Search Unity

Having a Problem; Need Help

Discussion in 'Editor & General Support' started by Maker16, Apr 28, 2011.

  1. Maker16

    Maker16

    Joined:
    Mar 4, 2009
    Posts:
    779
    Since I'm doing a space based game, and distances are on a very large scale, I'm using the technique where you keep the player at the origin and move the universe instead. That works great, except in the case of collisions. When I was moving everything using transforms, there were no rigidbodies, and so no collisions. The player could clip an asteroid and nothing would happen.

    So I then decied to use rigidbodies instead. However, there is still a problem. Using the same movement technique, rather than affecting the player's velocity, movement actually alters the velocity of every rigidbody in the scene and the player remains still. That works great, too, except when collisions occur.

    See, in order to keep the player at the origin, I have to either freeze the rigidbody, or reset its position to the origin at the end of each frame. Regardless, everythign falls apart when the ship collides with something because that something will respond appropriately to the collision, but nothing else in the scene will, which it should because, to maintain the illusion that the ship is moving, if the ship carems off of an asteroid, EVERYTHING in the scene should respond as though it just collided with the ship in the same manner.

    Anyone have any idea how I can get every rigidbody in the scene to react as though it shares the same collision with the ship as the object that actually did collide with the ship?