SimplePool (Just one single collision each time)

Hi Guys,

I am playing with SimplePool sample code, what I want is that :

After fire cueball, I just want one single collision to be detected, say :cueball hits 3 balls, I just want to detect one collision and from collision function to remove one ball, not 3 balls.

How can I do that.

Thanks

Mila [import]uid: 83418 topic_id: 21172 reply_id: 321172[/import]

If it was the first ball that was hit you could use a flag.

canRemove = true

then on collision remove event.other and canRemove = false.

Then using a timer set canRemove back to true. (Or set it back to true when you next shoot the ball.)

Peach :slight_smile: [import]uid: 52491 topic_id: 21172 reply_id: 83912[/import]