So two basic potential approaches come to mind right away:

If you would like an explicit testing approach, you could cast a ray down
from the car and check the material or other property of the intersected
geometry.

A potentially nicer solution could be to represent the track as a spline (I
recommend looking at Catmull-Rom splines), and generate the track geometry
from that.  You could then use the same data for collision detection as well
by testing distance from the spline to the car.

I haven't used them, but there are some path tools in away3d that may help
you here. Look at the Path and PathExtrude classes.

HTH,
-Ken


On Mon, Nov 16, 2009 at 10:51 AM, narongrit kanhanoi
<[email protected]>wrote:

> Hi everybody
>
> today i find a nice racing game and i found
>
> http://www.flashracegames.com/play-sprint-race-3d.html
>
> if i try to write racing game like this with away3d
>
> who can tel me  what i do if i want about check when car drive out of
> street and slow down
>
>
> thank you ....
>
>

Reply via email to