# Hit test on top of enemy

**URL:** <https://forum.kirupa.com/t/hit-test-on-top-of-enemy/227918>\
**Category:** Uncategorized\
**Created:** [June 3, 2007, 9:27pm UTC](https://forum.kirupa.com/t/hit-test-on-top-of-enemy/227918 "2007-06-03T21:27:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 3, 2007, 9:27pm UTC](https://forum.kirupa.com/t/hit-test-on-top-of-enemy/227918/1 "2007-06-03T21:27:54Z")

</div>

Im trying to make a mario like game where if you jump ontop of the enemy it gets smashed. Right now I have it so when you hit anywhere of the enemy you die. I want it so if you are on top of the enemies head it dies rather than you. How would I do that kind of hitTest?
