Alice Community

Alice Community (
-   How do I...? (
-   -   I need help with a racing game (

mslvr40 11-18-2011 08:31 PM

I need help with a racing game
Hi. in my racing game I would like the car to stop or slow down when it goes off road. can you please either give me a link to an image with the method or a nother thread that has successfully solved this problem. Thank you

davidghemer 11-29-2011 01:12 AM

The exact solution will depend on what kind of road you have (straight, bending?). But in general terms you could use one or more dummy objects to define the edge of the track. Then you could use "distance to" functions to determine when the car goes off the track. Put the test inside a "when something is true" event and get the car to stop/slow whenever the event is triggered.

This is a similar problem to collision detection, so you might want to do a search on this. I have a video on collision detection - follow the first link in my signature.

All times are GMT -5. The time now is 03:22 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.