hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Collision Impulse is broken

    Scheduled Pinned Locked Moved Bug Reports
    1 Posts 1 Posters 273 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      Deeeds
      last edited by

      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!

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post