# Quick question about hitTestObject

**URL:** <https://forum.kirupa.com/t/quick-question-about-hittestobject/271017>\
**Category:** Uncategorized\
**Created:** [September 17, 2008, 12:56pm UTC](https://forum.kirupa.com/t/quick-question-about-hittestobject/271017 "2008-09-17T12:56:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwopitz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jwopitz/32/1556_2.png) [@jwopitz](https://forum.kirupa.com/u/jwopitz)\
**Post date:** [September 17, 2008, 12:56pm UTC](https://forum.kirupa.com/t/quick-question-about-hittestobject/271017/1 "2008-09-17T12:56:53Z")

</div>

Hiya folks.

I have encountered an interesting problem regarding nested DisplayObjectContainers and their ability to use hitTestObject. Wondered if someone with more familiarity with this particular function might offer a work-around (aside from the quite heavy-handed solution I am using now).

Assume following:  
[LIST]  
[_]SpriteA contains SpriteA’ and SpriteB contains SpriteB’  
[_]SpriteA & SpriteB are sibling containers (meaning they have the same parent)  
[_]SpriteA’ & SpriteB’ are displayed using the drawing API  
[_]SpriteA & SpriteB “appear” to overlap  
[/LIST]

Now given those criteria SpriteA.hitTest(SpriteB) return false. I am assuming this is because the bounding does not include visual elements constructed with the drawing API in nested child objects? What’s the deal? :trout:

Currently my only solution is to take data that helps in drawing the child nodes, manually create a Rectangle for each, and do an intersection of those two Rectangles. This involves a few intermediary steps that are include converting from isometric to actual screen coordinates and then a localToGlobal conversion.

Thanks for any clues.
