1

Closed

dAccelerate and dSteering are not clamped

description

In car.cs at lines 225 and 229 the function MathHelper.Clamp is used incorrectly: the function does not clamp the first argument but it returns the clamped value.
 
Change those lines as following:
dAccelerate = MathHelper.Clamp(dAccelerate, -deltaAccelerate, deltaAccelerate);
dSteering = MathHelper.Clamp(dSteering, -deltaSteering, deltaSteering);
Closed Apr 18, 2009 at 12:57 PM by noone88

comments

noone88 wrote Apr 18, 2009 at 12:57 PM

yep, that was a bug. it's fixed now, thanks!

wrote Apr 18, 2009 at 12:57 PM

wrote Feb 14, 2013 at 7:35 PM

wrote May 16, 2013 at 9:12 AM