Bepu v2 Collision Detection

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Posts: 51
Joined: Wed May 08, 2019 12:17 am

Bepu v2 Collision Detection

Post by tomweiland » Wed Sep 11, 2019 4:02 pm

I have a sphere collider acting as a cannonball and I want it to explode whenever it hits something. I don't need to know the force of the impact, just when and where it occurred in the simulation so I can get particles/sounds going. I also need to know if the object it collided with was a ship (which is a compound body).

I'm pretty sure the ContactEventsDemo will allow me to do most of this—is it the best way to go about it, though?

Site Admin
Posts: 4723
Joined: Tue Jul 04, 2006 4:45 am

Re: Bepu v2 Collision Detection

Post by Norbo » Wed Sep 11, 2019 8:17 pm

Something like the ContactEventsDemo could work, although it is a bit fatter than you might need. As luck would have it, I just finished a TankDemo in which a bunch of tanks try to blow each other up. It shows a pretty simple/direct way of reporting projectile impacts and processing them: ... llbacks.cs

Post Reply

Who is online

Users browsing this forum: No registered users and 61 guests