Cornering velocity bug fix

David Savinkoff <[email protected]> Wed, 17 Dec 2014 18:31:22 -0700 (MST)
Newsgroups gmane.games.torcs.general
Message-ID <1277266387.11116730.1418866282346.JavaMail.zimbra@mailid.telus.net>
Hi,

TORCS was fueling my high velocity entertainment when road rage set in
and I had to glare at the source code to calm down.

I think I found a bug.

The car drives much better now.

Sincerely,
David Savinkoff

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk

_______________________________________________
Torcs-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/torcs-users
car.cpp.diff (text/x-patch, 639 B)
--- torcs-1.3.6/src/modules/simu/simuv2/car.old.cpp	2014-12-17 16:49:47.000000000 -0800
+++ torcs-1.3.6/src/modules/simu/simuv2/car.cpp		2014-12-17 16:57:30.000000000 -0800
@@ -353,8 +353,8 @@
 		/* where r = sqrt(x*x + y*y)                 */
 		/* the tangent vector is -y / r and x / r    */
 		// compute corner velocity at local frame
-		car->corner[i].vel.ax = - car->DynGC.vel.az * y;
-		car->corner[i].vel.ay = car->DynGC.vel.az * x;
+		car->corner[i].vel.ay = - car->DynGC.vel.az * y;
+		car->corner[i].vel.ax = car->DynGC.vel.az * x;
 		
 		// rotate to global and add global center of mass velocity
 		// note: global to local.