dynamic body colliding with a kinematic body

Hi,

I have a kinematic body that is constantly moving across the screen. My player is a dynamic body. Right now when my player collides with the kinematic body, it goes flying off the screen really fast. I would like to make it so when the dynamic body collides with the kinematic body, it doesn't react to it. However, I still don't want the dynamic body to pass through the kinematic body (eg making it a sensor isn't what I want) and I want the kinematic body to keep pushing the dynamic body as it moves. Might anyone point me in the right direction? Would I have to make a custom collision contact listener thing and set the dynamic body's velocity to 0 when it collides?


Thanks.


edit: So apparently setting my dynamic (player) body to have a density of 0 does exactly what I want it to do. Not sure if this is a good thing to do, though, as I'm not sure right now if there will be other situations where I want the density to be something nonzero.
Actually, the restitution is supposed to be used when you want to manipulate the way bodies bounce.

From the Box2D manual:
Quote:
Restitution is used to make objects bounce. The restitution value is usually set to be between 0 and 1. Consider dropping a ball on a table. A value of zero means the ball won't bounce. This is called an inelastic collision. A value of one means the ball's velocity will be exactly reflected. This is called a perfectly elastic collision.

Original thread: https://box2d.org/forum/viewtopic.php?t=6748