One body react to a collision while other doesn't.

jyrenth
Posts: 2
Joined: Wed May 05, 2010 7:37 pm

One body react to a collision while other doesn't.

Post by jyrenth »

The situation: In my game, I have the player (a marble) rolling around the world collecting smaller marbles. When the player collects a marble, it starts following him around. I want the player to be able to knock the target marbles around, but the targets not to affect the player at all (so if they run into him they just bounce off without transferring any energy to the player).

The wiki page here:
http://bulletphysics.org/mediawiki-1.5. ... _Filtering
Is wrong. Using their technique for power ups; they just don't collide at all.

I'm using the gContactAddedCallback to detect collisions and do other custom things, so I already have a function that is called if and only if a collision happens between the player and a target marble. Is there something I can add there to prevent the player marble from being affected by the collision?