alice-teacher Detect off road issue

James Vanderhyde jvanderhyde at benedictine.edu
Thu Nov 21 11:02:29 EST 2013


I wouldn't say there is a trick, but you can check for this kind of thing using the built-in functions. In this case you want to check the car's "distance in front of" the road. If the value of this function is too great or too small, then the car is past the side of the road, or off the road. Please see attached for a proof of concept.

James
--
Dr. James Vanderhyde
Math and Computer Science
Benedictine College
jvanderhyde at benedictine.edu
http://vanderhyde.us/~james/pro/



On Nov 20, 2013, at 6:05 PM, Marty Schultz <schultz_marty at hotmail.com> wrote:

> In Alice 2.3, is there a trick to detecting if a car (Class Car, for
> example), or the camera,  driving on a road (Class Road) drives off of the
> left or right side of the road?  Assume that the car is either on the same
> level as the road, or within 1 meter.
>
> It seems difficult to determine if the x,y position of the car (or camera
> current position) is within the x,y coordinates of the road.
>
> Thanks,
>
> Marty
>
>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20131121/d702a11b/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: car on road.a2w
Type: application/octet-stream
Size: 251107 bytes
Desc: car on road.a2w
Url : http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20131121/d702a11b/attachment-0001.obj 


More information about the alice-teachers mailing list