robot tutorial

qin qin <[email protected]> Fri, 23 Jul 2010 22:15:46 +0000
Newsgroups gmane.games.torcs.devel
Message-ID <[email protected]>
Hi all,

Got torcs to work in windows.

I'm following berniw's robot tutorial, but I'm not sure I understand this part:

angle = RtTrackSideTgAngleL(&(car->_trkPos)) - car->_yaw;

NORM_PI_PI(angle); // put the angle back in the range from -PI to PI
angle -= SC*car->_trkPos.toMiddle/car->_trkPos.seg->width;

I get that the angle is the turning angle because it's (the tangent of the track) - (the angle of the car).
But why are you taking away the distance to the middle/the width of the track?
What value does this give you?

Thanks.

qin__23 		 	   		  
_________________________________________________________________
Game on: Challenge friends to great games on Messenger
http://go.microsoft.com/?linkid=9734387

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

_______________________________________________
Torcs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/torcs-devel