Page 1 of 1

collision with dynamic concave entities?

Posted: Tue Jan 01, 2013 11:07 pm
by Davidson
First of all, thanks for the great library. Physics simulation is something that is new to me, and BEPU has been very helpful.
Anyway, my question is, how can I perform collision detection between concave entities? I have objects such as tunnels and tubes bent into varying shapes that I would like to allow the player to move through. As far as I can tell, something similar to the static mesh would be perfect, except for the fact that it's static. I don't really need full physics simulation on these objects, just the ability to move and rotate them in real time. Is this possible with BEPU?

Re: collision with dynamic concave entities?

Posted: Tue Jan 01, 2013 11:19 pm
by Norbo
A mobile mesh would do the trick. Note that mobile meshes are not as efficient as simple primitives like boxes or compound shapes of such simple primitives. Also note that they'll be very slightly slower than a StaticMesh for the same geometry due the different structures used to support movement.

Examples of mobiles meshes and compound bodies can be found in the BEPUphysicsDemos project, in the main source download. Demos of particular interest would be the MobileMeshDemo, the CompoundBodiesDemo, and perhaps the EntityConstructionDemo.

Re: collision with dynamic concave entities?

Posted: Tue Jan 01, 2013 11:45 pm
by Davidson
Heh, now I feel like a bit of an idiot. I Should have looked at that API documentation for longer!
Thanks Norbo, mobilemesh is perfect.