Car Project - Brake issue

Posted By: JoaoR

Car Project - Brake issue - 10/05/07 04:21

Im having a little problem with the car template project, i want increase the brake power when the player press the move_back button ("s"), ive increased the maxtorque brake, but it only change the brake power when we press the handbrake, i think it isnt changing the normal brake...

i copied this from plcar01.wdl, i think this is what takes control of the normal braking, if im not wrong..
Code:
 
// if we drive in one direction and want to change direction, apply brakes
// (my._angSpeed__016>0 checks if rear wheel is turning forward
// direction<0 checks if user hits reverse key
if ((my._angSpeed__016>5 && direction<0) || (my._angSpeed__016<-5 && direction>0))
{
my._targetSpeed__016=0; // brake
// press brakes quarter down when rolling at high speed
if (abs(my._angSpeed__016)>0.50*my._maxAngSpeed__016)//era 25
{
test = 1; //variable to display in the screen
phcon_setmotor(my._wheelRL__016, nullvector, vector(my._angSpeed__016*0.5, 0.5*my._maxTorqueBrake__016,0), nullvector);//era 0.50 e 0.50 my._angSpeed__016*0.9
phcon_setmotor(my._wheelRR__016, nullvector, vector(my._angSpeed__016*0.5, 0.5*my._maxTorqueBrake__016,0), nullvector);
if(abs(my._angSpeed__016)>0.50*my._maxAngSpeed__016)
{
PlCar01_EventBrake(); // braking sound
}
}
else
{
// we're already slow- apply max. units brake torque
phcon_setmotor(my._wheelRL__016, nullvector, vector(0, my._maxTorqueBrake__016,0), nullvector);
phcon_setmotor(my._wheelRR__016, nullvector, vector(0, my._maxTorqueBrake__016,0), nullvector);
}
}


I placed a variable inside this condition to display in the screen to test if this "thingy" was executed and it displayed always test=0 instead of 1 at it should be.

Im using A6 6.60 pro, if it helps...

Ty.
Posted By: JoaoR

Re: Car Project - Brake issue - 10/08/07 14:44

so, any help available?
© 2024 lite-C Forums