# Applying Explosion Force/Damage from Visibility Triangles

This topic is 1216 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi again,

I'm working on a system for applying explosion force to the exposed surface area of target using 2D visibility polygon techniques. The result is that I get visibility triangles that look like this (see orange/red triangles):

Just looking for ideas on how to determine how much force to apply based on these triangles, and more importantly, at what point?

I know the area of the triangle, the length of the sides, the height of the triangle, etc. How much force should I be applying? Probably some percentage of the explosion circle's full arc, modulated somehow by impact distance. Should I apply force at the vertices? At the midpoint of the surface face? I'd love a continuous way to apply force based on the shape's COM, mass, and inertia from the surface area, if you know one.

Any ideas?

Thanks!

Edited by sufficientreason

##### Share on other sites

Are you using a physics engine for this task? In general physics engines have support for applying impulses to specific locations of the object (they will internally decompose the force to parallel and perpendicular components and apply rotational and linear acceleration based on that), so my first most-simplest-possible(tm) attempt would probably be to walk through the visible edge segments in small fixed distance intervals, and apply an impulse to each location along the edge, to the direction that faces directly outwards from the explosion center.

##### Share on other sites

I've written my own engine, and do have support for applying directional force at a point. The main goal of this approach was to find a more continuous solution than discrete intervals (otherwise I would be doing radial raycasts for my explosion rather than finding the visibility triangles).

What I'm thinking of doing is, for a given triangle, computing the area of that arc of the explosion circle (i.e. if there was no obstruction) and taking that over the area of the triangle (simulating the compression of that part of the explosion into the visibility triangle). Either just dividing it, or doing something nonlinear. This gives me an intensity value -- smaller triangles will have more "pressure" and should apply more force and damage.

What I'm not sure about is how to apply that force evenly across the surface area (the triangle edge that runs along the polygon's edge) without just sampling, and what normal to use for that force application.

Edited by sufficientreason

1. 1
Rutin
48
2. 2
3. 3
4. 4
5. 5

• 10
• 28
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633409
• Total Posts
3011717
• ### Who's Online (See full list)

There are no registered users currently online

×