Page 1 of 1
Disabling collision between objects of a certain type
Posted: Mon Oct 03, 2011 12:32 am
by snoozbuster
I took a look at the Collision Filtering demo, and I saw how to make two entities not collide, and I saw how to make two groups not collide, but is there a way to just add a bunch of Entities to a group and say "nothing in this group collides with anything else in this group?" Collision rule stuff is all over the place and I really have no idea what I'm looking for.
Re: Disabling collision between objects of a certain type
Posted: Mon Oct 03, 2011 1:27 am
by Norbo
is there a way to just add a bunch of Entities to a group and say "nothing in this group collides with anything else in this group?"
Yup. The
collision rules documentation has supplementary information too.
Basically, you could assign a NoBroadPhase collision rule between a group and itself. The CollisionGroup class has a bunch of static helper methods:
Code: Select all
CollisionGroup.DefineCollisionRule(group, group, CollisionRule.NoBroadPhase);
Re: Disabling collision between objects of a certain type
Posted: Mon Oct 03, 2011 4:02 am
by snoozbuster
Gotcha. I remembered that the objects I'd need to put in the group are kinetic anyway, so... Does the Solver even check for collision at all between kinetics?
Re: Disabling collision between objects of a certain type
Posted: Mon Oct 03, 2011 4:05 am
by Norbo
Does the Solver even check for collision at all between kinetics?
By default, all kinematic entities (and static collidables like the StaticMesh, InstancedMesh, and Terrain) belong to their own collision group which has a NoBroadPhase relationship with itself. So nope; no collision detection, no contacts, no solver.
Re: Disabling collision between objects of a certain type
Posted: Mon Oct 03, 2011 4:19 am
by snoozbuster
Fantastic. But, it's nice to know anyway. =p