Page 1 of 1

Collision

Posted: Mon Apr 27, 2015 1:58 pm
by pesant19
I have difficulty to understand the collision documentation. I made a golf game and I try to set the collision between an the hole. The hole is a static entity and the ball is a dynamics entity. I want to know when the ball hit the cylinder. I had a golf course and the collision functional, but I want to set a different reaction when she hit the hole, like disappears.

Re: Collision

Posted: Mon Apr 27, 2015 6:35 pm
by Norbo
It sounds like collision events would be useful. Check out the FishInABarrelDemo in the BEPUphysicsDemos for an example of their use. If you haven't seen it already, also check out the collision events documentation. You'll probably want to use one of the 'deferred' events (those with past-tense names, like InitialCollisionDetected) to do your removal logic.