March 25, 2011

Things that go bump

We finally implemented a basic physics system featuring forces, collision detection and response. Force vectors can be added to objects, which now have a "mass" property. In the case of a collision event, the force vectors will be distributed on the affected objects depending on their mass ratio. This causes light objects to bounce back when hitting a much heavier object and vice versa. Collision detection works between object/scene geometry as well as between multiple objects. Collision tests are performed using bounding spheres and oriented bounding boxes in a second pass. The side effects caused us some serious headaches and required some heavy rework of already running features. Its still far from perfect and thus strange things may happen - like objects floating in mid air or bouncing away in curios directions :) But, its a good start and we probably will get hands onto the API/scripting stuff within the next weeks.