dynamically providing my own potential contacts per moving object

Oct 10, 2010 at 10:12 AM

hi.  i will be doing my own space partitioning for graphics.

i don't know whether to assume you have your own spacial partitioning scheme that limits bodies to only checking nearby bodies, or not.

if you DO do.... you think it  would work well with a paged terrain system, like MMOs & virtual worlds use?

if you DO (have your own partitioning) i'm guessing it would still be good to not traverse multiple partition systems?


i would like it if i could provide my own relevant potential contact surfaces (per moving object) to make sure the minimum amount of CPU time is taken up by the physics engine.  something that is extremely important on the XBox.

also i am working with XNA 4.0, so hopefully that won't be an issue.  8)

Oct 13, 2010 at 2:23 AM

I just use a sweep-and-prune technique by default, so there's no partitioning, but objects that aren't close won't be processed further. But you could certainly replace it with your own broad-phase collision scheme. Just inherit BroadPhase and duplicate what the SweepAndPrune class does, but with your own technique. 

To go further than that, you'd probably need to replace some of the narrow phase tests with your own. It should be relatively easy to do by looking at what the existing techniques do (they basically report collision points back to a collision functor that gets passed in).

I tried porting stuff to XNA4 back in the beta, but had trouble with the pipeline parts. I'm not sure when I'll get time to try again though.