Absinthe
Absinthe

Reputation: 3391

actionscript 2 collision detection

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.

Upvotes: 0

Views: 276

Answers (1)

Prasad Silva
Prasad Silva

Reputation: 1042

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

Upvotes: 0

Related Questions