00:00
00:00
Newgrounds Background Image Theme

Okidou just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Collision Detection 1.4

Share Collapse

Author Comments

This is an Advanced Collision Detection Tutorial where you can draw custom polygons and check how it works, unlike the basic "hitTest()" function which supports only 'rectangle vs. rectangles' or 'any shape vs. points'. Depending on 'any shape vs. points' is very slow and buggy when we extend it.


This is made using Flash CS3 and ActionScript 3.0, based on SAT (Separating Axis Theorem).
How-to and other info. are provided in the application (check 'Credits', 'Future').

Log in / sign up to vote & review!

nice :)

Interesting :)
I'm just wondering what's the system, because I've done very strange shapes, and I didn't get the logic for how the lines are drown. How does your engine deciding which point to which side to connect ?

It's a nice work though, keep it going :)

Fla file would be appreciated

johnchfr responds:

Thanx...
It was a bit complicated, but I figured it out. By the way, I'm not using any special engine but the theory behind, as I mentioned, is SAT.
The core function is projecting a point perpendicularly to a straight line (importantly, with CPU optimization).

Credits & Info

Views
3,938
Faves:
2
Votes
2
Score
0.66 / 5.00

Uploaded
May 16, 2008
8:39 AM EDT