Show ActivationState

5 views
Skip to first unread message

John Brookes

unread,
Aug 1, 2011, 8:26:57 AM8/1/11
to bulletf...@googlegroups.com

Just playing about came up with this as a quick debug on activation state.

for each ( var rb:btRigidBody in physicsWorld.rigidBodies)
{
    Mesh(Away3D4Mesh(rb.skin).mesh).showBounds = true;
    if (rb.activationState  == 1) // active
    {
        Mesh(Away3D4Mesh(rb.skin).mesh).bounds.boundingRenderable.color = 0x00ff00;
    }
    else if (rb.activationState == 2) //island sleeping
    {
        Mesh(Away3D4Mesh(rb.skin).mesh).bounds.boundingRenderable.color = 0xff0000;
    }
    else if (rb.activationState == 3) // wants deactivation
    {
        Mesh(Away3D4Mesh(rb.skin).mesh).bounds.boundingRenderable.color = 0xffcc33;
    }
    else if (rb.activationState == 4) // Disable Deactivation
    {
        Mesh(Away3D4Mesh(rb.skin).mesh).bounds.boundingRenderable.color = 0x0000ff;
    }
    //else its DISABLE_SIMULATION white
}

Ps
Again well done, terrain test. wooo hooo ;)

ringodotnl

unread,
Aug 2, 2011, 2:03:10 AM8/2/11
to Bulletflash.dev
Thanks John for sharing this!
Reply all
Reply to author
Forward
0 new messages