Another physics demo

Blitz3D Forums/Blitz3D Programming/Another physics demo

Miracle(Posted 2003) [#1]
Since we seem to be talking physics over here now ...

Blitz Entity Physics Pack - Source code plus one image map

This is a heavily modified version of the verlet physics package from the "Here, have some physics" thread, designed to take advantage of some of Blitz3D's natural 3D functions. It's slightly slower than the pure math version, mostly I think because of the sphere-to-poly collisions. There's also some frame-limiting code (lifted wholesale from Morduun's article on BlitzCoder) and a square-root approximation routine for those who want to fiddle with it. I still say the regular Sqr() routine is faster than anything we can code, but you may find differently.

Since the collision spheres are now Blitz entities, that means they have an orientation. Therefore, somebody could potentially write in some angular constraints. Hint hint.


Beaker(Posted 2003) [#2]
Sqr() is always faster (and more accurate) than the Taylor distance approximation.