Chris wrote:So when I’m firing my ar15 carbine at the zombies in left4dead, the half-life engine is (almost certainly) doing a ray-hit-versus-triangle test, testing the line out of the barrel of my gun against the triangle mesh that is the zombie in front of me. When it detects a hit (and it will, because I’m an awesome shot), it can also calculate exactly where I’ve hit the zombie (the head), it can spawn blood particles, calculate damage, and do all that stuff you expect to happen.
More or less. Source applies one further optimisation: hits and collisions are detected with invisible low-detail versions of each model. For bullets, the polygons are literally arranged into boxes surrounding each moveable bone.









