btRayCastVehicle, slight lateral slip on slopes when still

Skuzz
Posts: 11
Joined: Wed Aug 25, 2010 12:57 am

btRayCastVehicle, slight lateral slip on slopes when still

Post by Skuzz »

On a slope with brakes on, no engine force (i.e, parked) my vehicle creeps *laterally only*, tweaking various suspension settings in realtime doesn't help, too much frictionSlip causes jittering, and doesn't help anyway.

Happens with or without btMotionState usage.

Feels like something fundamental.

Any ideas?
Skuzz
Posts: 11
Joined: Wed Aug 25, 2010 12:57 am

Re: btRayCastVehicle, slight lateral slip on slopes when sti

Post by Skuzz »

btContactConstraint.cpp

Changing contactDamping to 1.0 improves things:

Code: Select all

	//todo: move this into proper structure
	btScalar contactDamping = btScalar(0.2);

...

	btScalar velocityImpulse = -contactDamping * rel_vel * jacDiagABInv;
	impulse = velocityImpulse;
impulse is 'm_sideImpulse', which back in btRayCastVehicle.cpp has another random stiffness var applied to it:

Although sideFrictionStiffness2 is set to 1.0 by default.

Code: Select all

m_sideImpulse[i] *= sideFrictionStiffness2;