Collision Detection

Collision detection in MV3D is handled at the Area level. Areas define several physics spaces that separate out collisions. They have an active space, disabled space, and special space. The active space is for anything that is currently moving. This space is most actively checked for collisions. All objects in it are collided with each other. The objects are also collided with the disabled space. That space is for stationary objects and mobile objects that aren't currently moving. The disabled space is only collided with the active space. The third space type, the special space, is for anything that doesn't react normally to physics collisions. For example, gateways are in this space because they only use collisions to transfer objects to their destination area. They don't actually react with other objects in other ways. In order to manage collisions, there is a CollisionMaker which handles it. Areas contain one and use it to keep track of collisions including the resulting contact joints that are created in ODE.