Issue with Box2D properties

0 favourites
  • 2 posts
From the Asset Store
Weapon System
$19.99 USD
Weapon System is a Construct behavior that serves as manager of weapons and their 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

  • Try Construct 3

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

    Try 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)