Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm looking for a good way to simulate damage, for example a weapon firing at a ship it would calculate the damage depending on layer type, weapon type, angle and similar what i need is a way to to represent the damage to a certain layer. I'm thinking of using matrices for keeping track of damage and also the appearance of the model.

What the problem is for flat surfaces its not a problem but for curved surfaces calculating the angle, at least no way that i know of.

For example its a curved hull with 3 armor layers, so we have 4 matrices 3 for the integrity of the armor and a 4th for the height map there is also a density variable(increasing the armor matrix size and then assigning more values in the heightmap/location map to the coresponding layer surface.

Is there a better way to do this?

share|improve this question
I'm sorry, I do not completely understand the question. Is your problem calculating the damage or showing the damage? – drxzcl Apr 8 '11 at 8:15

1 Answer

If you have the equation of the curve in question - or even just an approximation - then you can work out the tangent of the curve at the point where the projectile contacts it. You can then treat that tangent as if it was a flat surface that has been hit and work out the angle of incidence accordingly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.