Collision wonky after changing static properties

What steps will reproduce the problem?
Create a non-static body. Run a few steps of the simulation. Set it to
static (0 density). Other objects won't collide with it anymore.

What is the expected output? What do you see instead?
Objects should collide; they don't. At least not properly.. they sort of
slow down but pass through like jelly.

What version of the product are you using? On what operating system?
2.1.0; Linux version 2.6.28-15-generic running on amd6

Please provide any additional information below.

Sample code:

Code:
void Object::setDensity(qreal dens) {
    Q_ASSERT(m_body != NULL);
    if(dens != density()) {
        for(b2Fixture *f = m_body->GetFixtureList(); f; f = f->GetNext()) {
            f->SetDensity(dens);
        }
        m_body->SetMassFromShapes();
        emit propertyChanged();
    }
}



http://code.google.com/p/box2d/issues/l ... 1252209373
Sounds like a bug. Thanks for posting.
Recorded a demo: http://www.youtube.com/watch?v=6qYEzYSlHNU
This has been fixed. The static body still had a velocity (even though it doesn't move).

Note that you can still set the velocity on a static body to get the wonky.
Oh! That's what the problem was? In that case, I can apply the fix to earlier versions too 🙂 Cool. Thanks 😀

Original thread: https://box2d.org/forum/viewtopic.php?t=3662