00:00
00:00

Speed Collision Tut AS3

Share Collapse

Author Comments

tutorial for speed collision

Log in / sign up to vote & review!

Newgrounds accounts are free and registered users see fewer ads!

This is a nice tutorial for some really simple Collision Detection but it's also rather slow ans imprecise.
HitTestPoint doesn't work 100% of the time, problems arise while using Vcams and such, hitTestPoint is based on the Rasterized graphics of a MovieClip, doing things like changing the quality can effect it's results.

A much better approach is to create some sort of collision shape and then calculate if the point is in it without using hitTestPoint.

Also using a for loop to continuously check a point is very slow, the fast something moves the more work has to be done, It's better to use lines and calculate collision points, it only needs to do it once per object rather than for as fast as it's going and for every object.

For Beginners or as a smaller project this is a good method to start out with, but soon you'll fine that this is insufficient for anything more complicated.

I am a total newbie at AS3 and this blew my mind...
Great tutorial, man.
If you're interested in helping a newbie, please PM me.

A decent tutorial, but does not need it's own flash.

Credits & Info

Views
2,090
Faves:
2
Votes
4
Score
4.40 / 5.00

Uploaded
Feb 1, 2014
10:21 AM EST
Genre
Tutorial