May 23, 2012, 01:05:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Goofy braking  (Read 575 times)
Spaz
Full Member
***
Posts: 109


View Profile
« on: May 07, 2009, 06:30:22 PM »

I love how the traffic system works, but have any of you figured out what settings to play with so that it doesn't look like your car has the hiccups any time it brakes for the car in front of it?  Do I need to add a bunch of mass to the back end?  Should I adjust the shocks?  Something else?

Here's an example.  Watch the red car in the back.

http://www.youtube.com/watch?v=Gb7dRTfW1UQ
Logged
Ron
Sr. Member
****
Posts: 326


View Profile
« Reply #1 on: May 07, 2009, 06:56:30 PM »

I had good luck with applying the force at a slightly different location instead of the wheel location. You could probably do the same by lowering the center of mass too.
Code:
else if (handbrakePressed >= 0.9f && forwardPressed <= 0.1f)
{
if (backLeftOnGround)
{
collideBase.AddForce( mtx.ZAxis * leftSideForce, object.GetCurMatrix().Project( 0.6, 0.6, -1));
//if (frontLeftOnGround && frontRightOnGround)
//collideBase.AddForce( mtx.XAxis * turnForce * speed / 2000, object.GetCurMatrix().Project( 0.6, 1.0, -10));
}
if (backRightOnGround)
{
collideBase.AddForce( mtx.ZAxis * rightSideForce, object.GetCurMatrix().Project( -0.6, 0.6, -1));
//if (frontLeftOnGround && frontRightOnGround)
//collideBase.AddForce( mtx.XAxis * turnForce * speed / 2000, object.GetCurMatrix().Project( -0.6, 1.0, -10));
}
}

Logged
Spaz
Full Member
***
Posts: 109


View Profile
« Reply #2 on: May 08, 2009, 03:06:24 PM »

Thanks, Ron.  I've been wanting the cars on the traffic system to look normal, though.  And for them I won't be pressing the handbrake.  I tried using your code where it looked like the regular braking would occur in the vehicle script, but it didn't seem to make much difference there.  What I finally found that seems to work pretty well was simply decreasing the BrakeEffectiveness variable in the OPR file quite a bit.  I thought I'd messed with that variable before and hadn't seen any difference, but it sure seems to do the trick. Smiley
Logged
gekido
Guest
« Reply #3 on: May 14, 2009, 04:22:16 PM »

you don't need to modify the script, or even any of the vehicle behaviors (controller settings) at all.

the trick is lowering the physics / collision body in your vehicle and potentially increasing the mass for it.
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!