0 Favourites

Issue with Box2D properties

  • I'm working on a project and I've ran into an issue with an object colliding with walls in a zero gravity environment. The issue is that if the object collides with a wall going slowly enough, it will not bounce regardless of the elasticity of the wall and object.

    I did a bit of research and found that this is related to a property in Box2D called b2_velocityThreshold. Basically what it does is if an object's velocity is below the threshold it will treat it as having an elasticity of 0. After some quick testing it appears it occurs if the velocity is less than 50 (for the perpendicular direction at least).

    Is there anyway to modify this value in C2, or get around it by modifying other physics properties? I can create my own collision events if absolutely necessary, but I'd prefer to stick with all physics. I'd like the object to bounce even if it is moving very slowly, only coming to a stop once the linear damping causes it to.

    Link to capx

    Thanks for any info/ideas

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Just wanted to ask an additional question in reference to this topic. Is it possible to directly manipulate all Box2D settings using the SDK? Seems like this would be very convenient.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
300 118,428
blackhornet's avatar
Unread hot topic
0 Favourites
Spam issue
201 16,838
Tom's avatar
Tom Construct Team Founder
Unread hot topic
116 8,961
PlayerEmers's avatar