Issue with Box2D properties

Get help using Construct 2

Post » Fri Jun 29, 2012 2:46 pm

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/ideasjtlindeman2012-06-30 12:46:57
B
16
Posts: 15
Reputation: 630

Post » Sat Jun 30, 2012 4:24 am

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.
B
16
Posts: 15
Reputation: 630


Return to How do I....?

Who is online

Users browsing this forum: Draconinho, luisgmolina, Magistross, nedzad, nimos100, R0J0hound, Rezzon71 and 31 guests