CompoundShape and Child Collision Detection
Posted: Mon Mar 19, 2012 8:38 pm
Hello. Newb here to BEPU and physics engines in general. So far I feel very spoiled by BEPU - it's great.
I feel like this is a simple question but couldn't figure it out from existing forum posts.
I have a CompoundBody made of two Shapes. I want both shapes to be collidable with other entities, and that's working fine. However I only want to catch collision events for one of the shapes in the CompoundBody, not all of them. How is this achieved?
I tried the following but the event is never raised.
The event is raised if I attach it to the entire compound.
I feel like this is a simple question but couldn't figure it out from existing forum posts.
I have a CompoundBody made of two Shapes. I want both shapes to be collidable with other entities, and that's working fine. However I only want to catch collision events for one of the shapes in the CompoundBody, not all of them. How is this achieved?
I tried the following but the event is never raised.
Code: Select all
compound.CollisionInformation.Children[0].CollisionInformation.Events.InitialCollisionDetected +=
(sender, other, pair) => { bla bla };