I am trying to add physics to a space flight simulation software called Orbiter. It allows bases to be setup in different planets and moons in the solar system. Internally it uses the double data type to deal with the large distances.
I want to add some physics elements to these bases like collision detection, non physical characters etc. Note that these bases are separated by huge distances. There are 3 ways to solve it as far as I know :
- Since Bullet uses float internally as single point precision is very fast, the objects in each base cant be added by using their distances. They would probably be too far apart for collision detection to work reliably(I am assuming so). So its better to add the bases by allocating each of them a certain volume in a single dynamics world. Say:
(0,0) - (100,100) for base 1
(101, 0) - (200, 100) for base 2
Then making sure that objects from 1 volume doesn't go into the others volume. - Compiling Bullet with double precision so the large distances are supported and using a single collision world.
- Using a separate physics world for each base as they are so widely separated anyway and objects will be added to only one world.
2 seems like a good idea for extending the bases in the future. I am going to add a lot of objects in a single base : 10 raycast vehicles, 20 non physical characters, 100s of rigid bodies etc. So it may be a good idea to have a separate collision world for each base. But I am not sure if 2 dynamics world is a good idea. Has it been attempted by anyone and how much CPU does it take ?
(1) is the option I am using right now, putting far away objects in separate volumes in a single bullet world.
So I would love to have suggestions on how to proceed.