Jump to content
  • Advertisement
Sign in to follow this  
sufficientreason

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.

If you intended to correct an error in the post then please contact us.

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):

 

ghJC3ot.png

 

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 this post


Link to post
Share on other sites
Advertisement

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 this post


Link to post
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!