I'm making a space game using the free version of Havok Physics. So far everything is going great but I'm encountering an issue with how I'm designing my gameplay and setting up my world broadphase and landscape meshes.
In the game, you can fly around Earth-sized procedurally-generated planet surfaces (and space) in a ship at very high speeds. In order to load landscape physics efficiently I generate very large, low-def meshes (they can be huge- like 8000m x 8000m). This is only as a safeguard in case the player crashes into a mountain or whatever. Once the ship slows down, the game generates smaller, high-def terrain chunks (more like 100m x 100m) for landing and walking around. All these chunks are added to the physics world, and the world is "silently shifted" a-la SlidingWorldDemo in order to keep everything in the right place as the player flies around. This is all working great- everything is nice and fast and it's lots of fun.
The problem is my broadphase size. I was hoping that I could add fixed objects outside the broadphase and they would "shift in" when I moved the world, but their AABBs do not seem to update when this happens. After reading the docs it would seem that if I forced the objects to update, it would involve recalculating collisions and is not a good idea. Am I right about that?
So, in order for the broadphase to accomodate this stuff it needs to be huge, like 25000m wide or more. Is this crazy? It would be one thing if I ONLY had huge objects, as I could scale everything, but the fact that I also deal with character-sized objects complicates matters.
I'm leaning towards having 2 physics worlds- one for the macro and one for the micro, and somehow syncronizing the two, but it seems like a lot of extra work and I'd like to avoid it if you guys think it's possible to have huge worlds, or think there might be another solution.
Thanks very much! My game is very small but it's a commercial project and if it ever makes any money I will definitely be buying a license! Havok is great! :D