Hit testing rotating objects

Hey guys and gals,

i’ve been lurking around kirupa.com for a while now - first of wanted to say great site and thanks for all the fantastic little titbits on here they have been very very useful :slight_smile:

Now however i seem to have a problem i cannot solve so i seek you council:

Does anyone know how to accuractly perform a hitTest with a rotating line. I’m working on a project which involves the interaction between a rotating line and some spurios shapes. the line rotates in a circle like the arm on a clock face and when the arm collides with one of my shapes an action is triggered (in this case a movieclip plays and a sound is heard).

I am having some problems with the triggering due to the functionality of the hitTest method. As far as i understand - hit test works by checking to see if the bounding boxes of two objects are interfereing with each other and then returning a result if they are.

As a line rotates its bounding box changes size (long and thin like the line when flat and very big and sqaure when on a diagonal) which means that it will return a hitTest result when the line itself and two objects are NOT touching each other.

What i want to achieve is a hitTest between -just the line- and my other objects not its bounding box.

To solve this on the target end i have the hit text occouring not on the entire target movieclip but on a small circle at its centre, this method won’t work with the spinning part - at its a line not a “blob”, if you see what i mean.

the SWF in question is here http://www.deevee.co.uk/null/problem.swf
(use the slider at the bottom to change the speed and direction of rotation, drag and drop the little blue blob around the place to see how it interacts).

any ideas or pointers would be much appreciated

many thanks

D