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.
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.