# Irregular HitTest

**URL:** <https://forum.kirupa.com/t/irregular-hittest/73396>\
**Category:** Uncategorized\
**Created:** [December 15, 2004, 10:34pm UTC](https://forum.kirupa.com/t/irregular-hittest/73396 "2004-12-15T22:34:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VoS](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@VoS](https://forum.kirupa.com/u/VoS)\
**Post date:** [December 15, 2004, 10:34pm UTC](https://forum.kirupa.com/t/irregular-hittest/73396/1 "2004-12-15T22:34:28Z")

</div>

ive recently made a game in which you have to avoid some big evil round planets. i found out the in the making of that that using the function hittest uses square objects. i dident bother much then with it, i just brought out the ol’e algebra book and looked up the distance formual and made my own hittest.

now my questyion is is there a more refined way of using hittest for a more irregular object than a circle.

I made somewhat irregualr objects have hittest boxxes so that it was split up into many smaller parts, this gets kinda tedious if its really irregualr or if i need to move it around on the screen

btw if anyone wants ta c the game i made 😉  
[http://xev.mine.nu/jens/revengeofdots.html](http://xev.mine.nu/jens/revengeofdots.html)  
avoid everyting , and shop at the store on the planet , u can go over the big planet in lower left corner but not the ones in orbit 😉  
a few bugs still like only way to restart is the reload button in browser
