Disabling collision between objects of a certain type
-
- Posts: 172
- Joined: Sat Sep 24, 2011 7:31 am
Disabling collision between objects of a certain type
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
Yup. The collision rules documentation has supplementary information too.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?"
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);
-
- Posts: 172
- Joined: Sat Sep 24, 2011 7:31 am
Re: Disabling collision between objects of a certain type
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
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.Does the Solver even check for collision at all between kinetics?
-
- Posts: 172
- Joined: Sat Sep 24, 2011 7:31 am
Re: Disabling collision between objects of a certain type
Fantastic. But, it's nice to know anyway. =p