Removing collisions between all objects in single group.

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Socram
Posts: 20
Joined: Sat Sep 24, 2011 4:33 am

Removing collisions between all objects in single group.

Post by Socram »

So I'm constructing a vehicle that consists of a bunch of 1x1x1 cubes that are all within 1 unit of each other. Because of this, when I weld them together they all tend to smack around against one another and cause the whole vehicle to shake, and I imagine all these collisions firing at once is making the vehicle itself very expensive to simulate. I know I could combine the boxes into a compound shape and simulate them as one body (which I may in fact end up doing) but I first want to keep them as separate bodies for the time being if I can make that work. So is there any way to remove collisions between all objects in a single group?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Removing collisions between all objects in single group.

Post by Norbo »

Yup, using collision rules: http://bepuphysics.codeplex.com/wikipag ... umentation

You'd probably be most interested in the collision group part. You could put all the objects into the same collision group, and set that group to NoBroadPhase with itself.
Socram
Posts: 20
Joined: Sat Sep 24, 2011 4:33 am

Re: Removing collisions between all objects in single group.

Post by Socram »

Bah I'm an idiot, I saw that setting collision rules between groups required two groups and just assumed that it only worked between 2 separate groups, and not just one if you set both groups to the same. I spent like 30 minutes looking through the documentation for something that did it all within a single group. Thanks for clearing that up.
Post Reply