# hitTest

**URL:** <https://forum.kirupa.com/t/hittest/317040>\
**Category:** Uncategorized\
**Created:** [December 8, 2010, 7:27pm UTC](https://forum.kirupa.com/t/hittest/317040 "2010-12-08T19:27:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbo](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tbo](https://forum.kirupa.com/u/tbo)\
**Post date:** [December 8, 2010, 7:27pm UTC](https://forum.kirupa.com/t/hittest/317040/1 "2010-12-08T19:27:15Z")

</div>

```auto
if (container.hitTestPoint(object.x,object.y,true)){

}

```

if container has multiple children, what is the fastest way to determine which child has been hit?

My only guess is a loop to test against each child individually. I have done this its not that much slower than hit testing against the whole container. however it is a little slower.
