How is this done?

Line Rider by *fsk
http://www.deviantart.com/deviation/40255643/

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

:pope:

Like this?
http://img339.imageshack.us/my.php?image=exampelrb2.swf

If so, just do a hittest with shapeflag
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#808080]// While or if[/COLOR]
[COLOR=#0000ff]while[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]this[/COLOR]._y–;
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]

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.