I'm trying to create crates that are destroyed when hit by the player at a certain velocity, but I'd like the player's velocity to not be effected by the collision. This way the player can run and smash-through a row of boxes but still have the same speed when he reached the end.
I can't use sensors, because the crates should collide normally with the player in most cases. I thought about using ContactFilter->ShouldCollide to pre-detect collisions, but this is called when AABB's overlap, so my crates would blow up before a "real" contact.
What I'd like to be able to do is return false from ContactListener->Add to tell Box2d to just throw-out the contact. My attempts at hacking Box2d usually end in failure though. Any other suggestions?
Thanks.
I can't use sensors, because the crates should collide normally with the player in most cases. I thought about using ContactFilter->ShouldCollide to pre-detect collisions, but this is called when AABB's overlap, so my crates would blow up before a "real" contact.
What I'd like to be able to do is return false from ContactListener->Add to tell Box2d to just throw-out the contact. My attempts at hacking Box2d usually end in failure though. Any other suggestions?
Thanks.