favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

configurable m_sideFrictionStiffness2 in btRaycastVehicle.cpp? #490

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Not a bug or defect... Suggestion: may be were not bad idea to make parameter 
m_sideFrictionStiffness2 available, currently hard-coded as 1.0 in 
btRaycastVehicle.cpp. Specially setting lower values has direct effect at 
sliding/drift (or different values for rear/front wheels).
Patch below adds m_sideFrictionStiffness parameter (default is set 1.0).

Thank you.

Original issue reported on code.google.com by mihail.i...@googlemail.com on 10 Mar 2011 at 8:05

Attachments:

GoogleCodeExporter commented 9 years ago
i think the patch can become obsolete too fast... it improves acess to sliding, 
and it is required, but it should work somehow already with m_skidInfo etc, ... 
may be i shall find better solution, looking at 
btRaycastVehicle::updateFriction .. sorry for now

Original comment by mihail.i...@googlemail.com on 10 Mar 2011 at 8:47

GoogleCodeExporter commented 9 years ago
Hi,
btRaycastVehicle uses a function "resolveSingleBilateral" from 
btContactConstraint.cpp.
This function has hardcoded paramenter "contactDamping"

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

It does the same as m_sideFrictionStiffness2 (hardcoded "1.0" in 
btRaycastVehicle.cpp).

My suggestion is to copy function "resolveSingleBilateral" in 
btRaycastVehicle.cpp, there are no any dependencies, name it may be 
"resolveSideImpulse" and then expose m_sideFrictionStiffness.

It might be good starting point for later improvements of turn/slide/drift 
issues. But for now it will not hurt vehicle class users and the parameter has 
big effect on sliding already..

I have moved my own code to custom raycast class, so for me there is no issue, 
can be closed. But i shall make a patch if you like, and post here..

Thank you.

Original comment by mihail.i...@googlemail.com on 16 Mar 2011 at 12:08

GoogleCodeExporter commented 9 years ago
The btRaycastVehicle is meant as a starting point/inspiration for writing your 
own vehicle class.

If you have specific patches, please re-open a new issue, otherwise let's just 
close it for now.

Original comment by erwin.coumans on 16 Mar 2011 at 5:52