GameMaker Physics question - no bounce at low velocity

Paxl

Member
I think I already know the answer to this, but I figured I'd see if anyone had run into this same issue.

The game I'm working on uses Box2D physics. I have different wall objects with different restitution params for more or less bounciness with dynamic objects. The problem is that no matter how 'bouncy' I make the walls, if the object's velocity is below a certain threshold, it won't bounce at all. At the pixels-to-metres setting in my game the velocities are pretty low, so I get a lot of failed bounces that look like they should definitely bounce.

It seems that Box2D has a setting that controls this: b2_velocityThreshold in the file b2Settings.h

Is there any way to edit that Box2D setting inside GMS2? Doesn't seem like it.

Another option would be to change my pixels-to-metres scale, but I've put a lot of work into tuning everything at the current scale.

I think the next thing I'll try is to set my 'bouncy' objects' restitution to zero, then apply a bounce force on the collision event.

Any thoughts?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
The internal Box2D library can't be edited from within GameMaker, no. As for the issue, file a bug and request a function to access that parameter (and any others that you feel are relevant), and yes, I think you'll have to deal with the collisions yourself.
 
M

Matt Hawkins

Guest
Reducing the linear dampening of the object may help it bounce at low velocity playa.
Another thing you could try is adjusting the pixels to meters ratio in your room properties B.
 
Top