# HitDetection Theory?

**URL:** <https://forum.kirupa.com/t/hitdetection-theory/287882>\
**Category:** flash\
**Created:** [May 7, 2009, 12:05pm UTC](https://forum.kirupa.com/t/hitdetection-theory/287882 "2009-05-07T12:05:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SonOfChaos](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SonOfChaos](https://forum.kirupa.com/u/SonOfChaos)\
**Post date:** [May 7, 2009, 12:05pm UTC](https://forum.kirupa.com/t/hitdetection-theory/287882/1 "2009-05-07T12:05:38Z")

</div>

Okay, this is more of a question asking for how I should approach this when I get to this rather than asking for coding help.

1. My game is a click shoot style game. I want the enemies to loose more Hitpoints when I shoot them in the head then when shot in torso, or limbs. Now, how does one do this, what concept should I study so I don’t have to ask so many questions when I come to this? Obviously I could have a variable called “hitpoints” for the enemy, and “damage” for the bullet, and ad/multiply/divide them according to where hit, but how do I get the head, torso and limbs to each be separate parts that can be hit?

2. Once I get the multiple boxes that would make up the hit detection, could I simply create a new layer and “skin” graphics over them?

3. Currently I’m using hitDetectObject in my click shoot game. This is fine but it seems that this draws a large box around the enemies shape, now I hope to get the hit detection to be location specific, and I want to skin graphics over this, but I want the hit detection to be based on the boxes and not the skinned over graphics as this would probably be to processor intensive. How could I more accurately and reasonably test hits?
