Contact Detection
Last updated
Was this helpful?
Last updated
Was this helpful?
ContactDetection module keeps track of contacts between hand's slave representation and contactable Rigidbodies (ContactableViews). It can distinguish hovering, touching and friction-based grabbing. This module requires a Puppet module to be registered in the same part. Variables of this model are described bellow:
Part: The part whose slave representation will be subject to contact detection. This reference has to be manually set.
Hover DetectionSystem: How should hovering be detected?
Overlap Sphere From Root: ContactableViews inside a sphere with center ContactDetectionModel.part.root.point.reprs["slave"].transformRef.position
and radius ContactDetectionModel.sphereCastRadius
will be considered as entered (hovered).
Triggers: TriggerNotifiers form Pheasy component of slave representation of part's root bone will be used to detect entered (hovered) objects.
Sphere Cast Radius: If using sphere overlap as hover detection system, this value will represent the radius of that sphere.
Detect Only These: If enabled, the list ContactDetectionModel.bonesToDetect
won't be automatically populated and the existing bones in this list will be the only ones that will be subjected to contact detection.
Bones To Detect: List of bones subjected to contact detection.
Is Entered: Is some bone hovering some contactable object?
Is Touched: Is some bone touching some contactable object?
Is Grasped: Is the part grasping some contactable object?
Contacts: List of detected contacts. Contacts are described in detail here.
Grasping detection is only appliable when references part is a hand (HandModel).
OnFirstEnter: Emmitted when a bone starts hovering an object while the rest of the bones are not contacting (hovering, touching or grasping) any object.
OnEnter: Emitted when a bone starts hovering some contactable object.
OnFirstTouch: Emmitted when a bone starts touching an object while the rest of the bones are not touching or grasping any object.
OnTouch: Emitted when a bone starts touching some contactable object.
OnFirstGrasp: Emmitted when a bone starts grasping an object while the rest of the bones are not touching or grasping any object.
OnGrasp: Emitted when a bone starts grasping some contactable object.
OnUngrasp: Emitted when a bone stops grasping some contactable object.
OnLastUngrasp: Emmitted when the last bone grasping an object stops doing it.
OnUntouch: Emitted when a bone stops touching some contactable object.
OnLastUntouch: Emmitted when the last bone touching an object stops doing it.
OnExit: Emitted when a bone stops hovering some contactable object.
OnLastExit: Emmitted when the last bone hovering an object stops doing it.