# \[as2\] Collision Detection

**URL:** <https://forum.kirupa.com/t/as2-collision-detection/311984>\
**Category:** programming\
**Created:** [July 21, 2010, 8:14pm UTC](https://forum.kirupa.com/t/as2-collision-detection/311984 "2010-07-21T20:14:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcelozep](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@marcelozep](https://forum.kirupa.com/u/marcelozep)\
**Post date:** [July 21, 2010, 8:14pm UTC](https://forum.kirupa.com/t/as2-collision-detection/311984/1 "2010-07-21T20:14:34Z")

</div>

Hi.  
I´d like to know how can I make a collision detection between two objects with complex shapes.  
Each object has a child movieclip.  
Example:

obj1.child  
obj2.child

I need to make a collision detection test between each child of those two objects.

As far as I know. I can use the hitTest for bitmap. But isn´t working.  
I´m not finding the right way to do it.  
I think it needs localToGlobal for x and y for each child clip coordinates and matrix, because obj1.child and obj2 rotates on \_root.onEnterFrame.

Anybody know how?

Thanks
