How is this done?

Line Rider by *fsk

How is the collisions with the ground (line) done? Vectors?


Like this?

If so, just do a hittest with shapeflag
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#808080]// While or if[/COLOR]

Something like that…

Note; This is not the best example, becouse its using my code which sucks. So with a better engine for those particles it would work in all instances :slight_smile:

edit: It doesnt seem to work, however im sure its just my code with the particles that messes it up…

Using hitTest is insanely inefficient, especially with shape tag and a large number of objects.

That guys is based off of some sick line detection algorithm. Basically takes a normal array of lines and calculates where the dot hits… think that spider man thing but only in the downward direction.

The easiest way is to find the distance under the sled to a given line. Then use the angle that it intersects at to find the angle the sled is at… only hard part is multiple lines under the sled and verticle lines.

Actually i think im over simplifying it some.