With a default collision group two Entities will ignore each other if they overlap and are kinematic and respond when one or both of them is dynamic.
If I add two Entities to a user defined collision group they no longer ignore each other when they are kinematic, which can cause problems.
How can I keep the ignore if kinematic and react if dynamic settings but within a user defined collision group?
EDIT: In particular two kinematic CompoundBody classes with TriangleSidedness.DoubleSided properties. If one is rotating with a low angular velocity while the other remains motionless then when they occupy the same space the velocity becomes jerky and no longer smooth.
Entities and specific collision groups - Kinematic Objects
-
- Posts: 249
- Joined: Wed Nov 17, 2010 1:49 pm
Re: Entities and specific collision groups - Kinematic Objec
The 'ignore if kinematic' behavior is implemented by creating two collision groups, one for dynamics and one for kinematics. Since the default collision rule is Normal, a NoBroadPhase collision rule is then defined between the kinematic group and itself.How can I keep the ignore if kinematic and react if dynamic settings but within a user defined collision group?
So, if you wanted the same behavior out of user-created groups, a similar NoBroadPhase collision rule could be defined. Or, for more narrow control, specific relationships could be defined.
There's also the option of providing a custom CollisionRuleCalculator and doing whatever you want.
Even with collision rules defined to be 'normal' between two kinematic objects, they will not interact via the solver. It is impossible for any physical interaction to change the velocity of a kinematic entity.EDIT: In particular two kinematic CompoundBody classes with TriangleSidedness.DoubleSided properties. If one is rotating with a low angular velocity while the other remains motionless then when they occupy the same space the velocity becomes jerky and no longer smooth.
That said, if the objects have CCD enabled and the collision rules are set such that their relationship is Normal, their motion could be getting clamped. That would explain the 'jerky' movement even though their velocity is not actually changing at all. This can be addressed directly by using a different MotionSettings.CCDFilter, though addressing it with appropriate collision rules is probably wise from a performance perspective (lots of unused kinematic-kinematic contact generation).
-
- Posts: 249
- Joined: Wed Nov 17, 2010 1:49 pm
Re: Entities and specific collision groups - Kinematic Objec
Thanks Norbo. That makes sense. 
