top | item 45497512

(no title)

dfltr | 4 months ago

> I assume there'd be a big single rectangular bounding box or sphere, and only once a projectile is in that range, then animations occur.

Now that's a fun one to think about. Hitscan attacks are just vectors right? So would there be some perf benefit to doing that initial intersection check with a less-detailed hitbox, then running the higher res animated check if the initial one reports back as "Yeah, this one could potentially intersect"? Or is the check itself expensive enough that it's faster to just run it once at full resolution?

Either way, this stuff is engineering catnip.

discuss

order

maplant|4 months ago

This is the basis for basically every physics engine in some form of another. Collision is divided into the "broad phase" pruning step that typically uses the bounding box of an object and a "narrow phase" collision detection step that uses the more detailed collision primitives

tarnith|4 months ago

also how raytracing works with bounding volume hierarchies

and how occlusion culling worked with BSP trees in Quake if I remember correctly as well