Saturday, February 24th, 2007
I have just updated the source Code with some optimizations. (they’ll be incorporated in my next game release soon too)
I haven’t updated the tutorials to reflect these enhancements yet, but the general concept is still the same.
The main changes are these:
- When constructing a BoundingPart you now additionally pass the original ModelMesh’s original BoundingSphere. This is used as a general proximity test, so the rest of the BoundingSphere’s don’t need to be transformed and tested on every frame.
- This behavior is optional. When calling Transform() there is a bool “optimizeâ€? parameter. Pass false and the behavior is as it was before.
- Re factored a little. The List stuff is now encapsulated into a class.
- When you run the sample, you will notice the BoundingSpheres often don’t move with the model. This is deliberate, and demonstrates the optimizations working. It means they didn’t need to get transformed on each frame because nothing (i.e. the 3D Mouse Cursor) is in the general proximity of their BoundingPart.
- the XBOX 360 controller now rumbles when the 3D Mouse cursor collides.
The old “tutorial” code is still available in the usual place, but you can get the new optimized version here also. (just scroll down the page further to find the updated version)

