When setting collision pair stuff is this needed
Bodys[0].CollisionRules.SpecificEntities.Add(Bodys[1], CollisionRule.NoPair);
Bodys[1].CollisionRules.SpecificEntities.Add(Bodys[0], CollisionRule.NoPair);
or would this have the same effect
Bodys[0].CollisionRules.SpecificEntities.Add(Bodys[1], CollisionRule.NoPair);
I would assume the 2nd one would be fine...
Also how is the new version going? Much more to do?
CollisionRule.NoPair Help
Re: CollisionRule.NoPair Help
The second option (one-way) is fine. If both ways are defined, it chooses the less interactive rule of the pair (NoPair over NoContacts, for example). And of course, the rule calculator callback in the broadphase can always be changed.
I recently finished up the rewrite of GJK and the general convex-convex collision system. Now that the basic required features are back in, I'm running around connecting bits and pieces to get it running. After that, the remaining work is going to be mostly collision detection special cases which are already partially implemented (compounds, meshes, fluid volumes, detector volumes, etc.), setting up CCD, and debugging.Also how is the new version going? Much more to do?
-
- Posts: 136
- Joined: Sun Jan 17, 2010 11:35 am
Re: CollisionRule.NoPair Help
Cool thanks for that.
Nice sounds like its coming along well then.
Thanks for the info.
Nice sounds like its coming along well then.
Thanks for the info.
Re: CollisionRule.NoPair Help
How would I change the rule calculator callback in the broadphase object? Space.broadphase doesn't contain anything I recognize as a delegate for calculating collision rules. I'm probably missing it while it's right in front of me...
Oops, just realized this is from 2010... sorry Norbo. Is this still something that's doable? I'm tempted to make collision group rules supercede personal rules... for some reason that seems easier to me.
Oops, just realized this is from 2010... sorry Norbo. Is this still something that's doable? I'm tempted to make collision group rules supercede personal rules... for some reason that seems easier to me.
Re: CollisionRule.NoPair Help
Yup. It's now located in the CollisionRules.CollisionRuleCalculator property.Is this still something that's doable? I'm tempted to make collision group rules supercede personal rules... for some reason that seems easier to me.
The CollisionRules.GetCollisionRuleDefault method is a good reference for switching the priorities around:
Code: Select all
public static CollisionRule GetCollisionRuleDefault(CollisionRules a, CollisionRules b)
{
CollisionRule pairRule = GetSpecificCollisionRuleDefault(a, b);
if (pairRule == CollisionRule.Defer)
{
pairRule = GetPersonalCollisionRuleDefault(a, b);
if (pairRule == CollisionRule.Defer)
pairRule = GetGroupCollisionRuleDefault(a, b);
}
if (pairRule == CollisionRule.Defer)
pairRule = DefaultCollisionRule;
return pairRule;
}