|
From: Albert V. <avi...@gm...> - 2008-07-24 13:08:23
|
a question somewhat related to this email: Is it possible to set the controls so that the amount of wheel turn is proportional to the speed of the car? I.e., when the car is running very fast, the larger turns of the wheel would be needed, but when the car is going through a slowly curvy section, the steering wheel is more sensitive to turning. I believe this is the behaviour in some comercial cars, not sure if there is a term for it... On Thu, Jul 24, 2008 at 1:33 PM, Matteo Lucchesi <ma...@lu...> wrote: > I've do a little change to the input joypad section. with a joypad like the > xbox controllor it's impossible to me make little correction to the > traiettories. The problem is that the input change too rapid so i introduce > a > variable the chage the max speed how the input can change. I've also add > the > deadZone becouse my joypad isn't centered. > > ...ehm sorry fo my english. It's the code: > > from: > > rightSteer = -SIGN(ax0) * cmd[CMD_RIGHTSTEER].pow * pow(fabs(ax0), > cmd[CMD_RIGHTSTEER].sens) / (1.0 + cmd[CMD_RIGHTSTEER].spdSens * > car->_speed_x); > > to: > > rightSteer = ((rap-1) * HCtx[idx]->prevRightSteer + (-SIGN(ax0)) * > (cmd[CMD_RIGHTSTEER].pow * pow(fabs(ax0), cmd[CMD_RIGHTSTEER].sens) / (1.0 > + > cmd[CMD_RIGHTSTEER].spdSens * car->_speed_x)))/rap + > cmd[CMD_RIGHTSTEER].deadZone; > > if (rightSteer > 0.0) rightSteer = 0.0; > if (rightSteer < -1.0) rightSteer = -1.0; > HCtx[idx]->prevRightSteer = rightSteer; > > i think that the variable rap has a good value of 7 but now i'm trying to > make > it configurable in the game. > > i don't know if it can be a solution for all joypad but for me is > necessary! > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Torcs-devel mailing list > Tor...@li... > https://lists.sourceforge.net/lists/listinfo/torcs-devel > |