Collision Impulse is broken

  • I've tried all different sides of different collisions.

    Dynamic to Kinematic (both sides)

    Dynamic to Dynamic (both sides)

    Dynamic to Wall (both sides)

    Nothing is reporting Collision Impulse as it should. Most of the time it's zero.

    ps I'm using faster than 60Hz physics.

    Collision Impulse is particularly useful for setting a damage amount, effect responses, sound volume and other happenstances that would occur from a collision.

    It's a specific feature of Chipmunk, that it gives this value, and it's particularly useful because it accounts for mass etc, saving a lot of calculation and monitoring. Just get the collision impulse value and respond accordingly.

    That it's so utterly broken is probably because of the time step problem at the core of cocos2D and hyperPad. This might be missing the tick when this information is being reported to be missed, particularly at high rates of physics solving, which happen much faster than the frame rate. At 240Hz physics solving, if the cocos2D time step has its issues, unless you prioritise seeking the physics callback and store it, there's little chance it would be "caught". It's able to be overwritten 3 times before the frame "tick" of cocos2D when using a 240Hz physics solver rate.

    1 report
    2 overwrite with zero
    3 overwrite with zero
    4 overwrite with zero and frame tick

    This would mean there's a 1 in 4 chance of an accurate reading being reported. But that's not the case. It's more like 2% to 5% of the time that something is being reported. And much less often an accurate number.

    Please fix!

Log in to reply