Hi.
Here is the problem. My characters (who is a simple box) restitution parameter is set to 0. But still when he falls from high he bounces from ground (maybe its becouse grounds restitution isn't 0, or may be it would bounce anyway). So i want to disable ground reaction impulse and prevent bouncing at all. I thought i cold do it in collision controller but i was wrong. I'm out of reasonable ideas...
Could anyone help me?
Can't you set the grounds restitution to zero? It's my understanding that to avoid a bounce effect, both colliding fixtures must have a restitution of zero. Sounds logical.
b2MixRestitution uses the maximum restitution, you can modify that function if you like.
I posted this in the C# port subforum, but I'm not sure if this is a port issue or if there is something about Box2D in general that I don't understand.
Anyway, some details: I'm using the Box2D.XNA port to create a tile based 2D platformer of sorts. In the most simple of levels I would have a long, rectangluar static body to represent the ground and a smaller, dynamic rectangluar body to represent my character. Both of these objects have no restitution, so that the character may land on the ground without bouncing. The character also has no friction.
The issue I am coming across is that from seemingly random heights and velocities, the character body will collide with the ground and then either A) bounce a small amount and then penetrate the ground body or B) simply penetrate the ground body. About 20% of the dynamic character body sinks into the ground. During this time, the BeginContact method of my ContactListener is not being called, which to me means the simulation doesn't think these two objects are colliding when they clearly are.
So, despite both bodies having a restitution of 0, occasionally they will still bounce. Like I said, I don't know if this is an issue with the XNA port or with Box2D in general, but hopefully someone can point me in the right direction.