czaloj / bullet

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

rollInfluence acts on wrong axis #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In btRaycastVehicle (around line 693) the roll influence is used as follows:

  rel_pos[2] *= wheelInfo.m_rollInfluence;

It appears that the axis it should work on is hardcoded, but the vehicle
allows the forward axis to be configured. So for example if Z is up
(instead of forward), the roll influence will affect the heading of the
kart, not the roll. It might be that writing:

 rel_pos[m_indexForwardAxis] *= wheelInfo.m_rollInfluence;

is correct, but I am not really familiar with the code to judge this.

Original issue reported on code.google.com by luding....@gmail.com on 6 Nov 2008 at 4:51

GoogleCodeExporter commented 9 years ago
it was indeed a bug, thanks for the report and fix!

http://code.google.com/p/bullet/source/detail?r=1462

Original comment by erwin.coumans on 6 Nov 2008 at 7:08

GoogleCodeExporter commented 9 years ago
Sorry for re-opening this:

I just did some debugging, and I realised that the bugfix I've sent above is not
correct. I mis-read the code and assumed that it was reducing the impulse for 
one
axis, but instead the code is reducing the distance to the center of the kart 
where
the impulse works. Which means that it should not be m_indexForwardAxis, but
m_indexUpAxis - if I am not mistaken :(

Original comment by luding....@gmail.com on 12 Dec 2008 at 12:32