actionscript 2 collision detection

271 Views Asked by At

I can achieve bounding box collision in AS2 but it's not accurate enough for my needs.

Here is my fla:collisiontest Click and drag the car; you'll see the text box change to "true" when a collision is detected. You'll note it can be triggered well before the rotating bar touches the badly drawn car.

Is there any way to achieve per-pixel collision, or something close with AS2?

I'm tied to AS2 rather than AS3 because of the Scaleform implementation of the game engine I'm developing for.

Thanks.

1

There are 1 best solutions below

0
On

Use MovieClip.hitTest with movieclip instances that have custom hit areas (using vector shapes). Use the hitArea property to define these custom hit areas.