SAM33 / jbox2d

Automatically exported from code.google.com/p/jbox2d
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

DistanceJoint bug #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Possible bug, starting at line 243 of DistanceJoint.java:

{{{
        Vec2.crossToOut(b1.m_angularVelocity, r1, v1);
        Vec2.crossToOut(b2.m_angularVelocity, r2, v2);
        v1.set(b1.m_linearVelocity).addLocal(b1.m_linearVelocity);
        v2.set(b2.m_linearVelocity).addLocal(b2.m_linearVelocity);
}}}

v1 and v2 are getting clobbered in the third and fourth lines, I'm pretty sure 
we just need to get rid of the set() part.  Should be a simple fix, I just need 
to test it and make sure it works right.

Original issue reported on code.google.com by ewjor...@gmail.com on 19 Jul 2011 at 8:58

GoogleCodeExporter commented 8 years ago
This could be related to issue 17, the warm starting bug in 
ConstantVolumeJoint, come to think of it.

Original comment by ewjor...@gmail.com on 19 Jul 2011 at 9:01

GoogleCodeExporter commented 8 years ago
Yeah this is incorrect, it should just be add() like you said.  Feel free to 
commit the change if you have time, otherwise I'll commit it tonight

Original comment by toucansa...@gmail.com on 19 Jul 2011 at 11:17

GoogleCodeExporter commented 8 years ago
fixed

Original comment by toucansa...@gmail.com on 20 Jul 2011 at 4:13