Rubberducking: Best approach to 3D explosions.
retained text
I'm posting this partly out of desire to rubberduck with humans, but also partly because it's the sort of content that I hope to see when I visit gamedev subreddits. I'm building a 3D explosion system for my framework at the moment. I have a rough idea of how I want to simulate explosions, but I'm not 100% confident that I'm going in the right direction. I've tried to test what other games do but it's really hard to get a clear picture because explosion simulations are invisible and you generally can't get enemies to shut up and stand still while you fire rockets at them. My framework is for a boomer shooter in the Build Engine Holy Trinity style so I'm going for fast fun explosions rather than super detailed shrapnel simulation etc. My current thinking is this: 1. Overlap sphere at the point of explosion. 2. Filter overlapped colliders down to entities that are allowed to be hit by explosions. 3. Filter remaining colliders down to ones that have direct line of sight to the explosion with raycasts (i.e. prevent things from getting hit through walls). I suspect I will need to fire raycasts at enemy feet, waists, and heads to avoid silly situations where explosions miss an enemy because a prop is blocking a ray to the center of their collider while the rest of their body is exposed... but perhaps this is overkill? 4. Calculate and publish force and damage messages for the remaining colliders based on distance from the explosion point. So... does anybody have any thoughts on how to improve this approach? Or ideas for smarter or more elegant approaches? Am I missing some secret industry standard explosion trick?
document fetched 2026-10-28 00:26 · canonical https://reddit.com/r/gamedev/comments/1xghnh0/rubberducking_best_approach_to_3d_explosions