Make an explosion hurt less the farther away you stand, never zero inside
A blast that either hurts fully or not at all makes rocket jumps and grenades feel like a coin toss, and one that measures from the middle of a big monster hits it far too softly. This entry gives a fade that feels fair for small and large targets alike.
Why this works
A blast reaches the surface of a body, not its centre, so distance should be measured to where the thing is actually touched. A smooth fade keeps near misses and direct hits distinct, and a small minimum makes any touch matter.
When not to use it
Skip it when walls and cover should shield targets: distance alone ignores them, so add a line-of-sight check. For a blast that must be all or nothing, such as a puzzle trigger, use a plain inside-or-outside test.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 15 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make an explosion hurt less the farther away you stand, never zero inside" (read_entry blast-damage-fades-from-edge-of-body) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP