Snappable

Introduction

SnappableView is the component attached to all rigidbodies that can be attracted and snapped to slave hand palm by Snapper module. SnappableView does not contain any logic, it only stores object-specific snapping configuration.

Each snappable object has a snap point. The snap point is the point where SnapperModel.indicator will be moved to when the object becomes a candidate to be selected and snapped. This snap point can be side-specific or ambidextrous.

View

Refs

  • Transform Ref: Snap point used when SnapperModel.hand.side is None.

  • Transform Ref L: Snap point used when SnapperModel.hand.side is Left.

  • Transform Ref R: Snap point used when SnapperModel.hand.side is Right.

Selection

  • Side: Hand side that can snap the object:

    • None: The object is not available.

    • Left/Right: The object is available for only one of the two hands.

    • Both: The object can be snapped by both hands.

  • Availability: Snappable objects can be available to be snapped or not under some of the following constraints:

    • None: The object is not available.

    • If Untouched By Any Snapper: The object can be snapped only if it's not being touched by any other hand.

    • If Untouched By This Current: The object can be snapped only if it's not being touched by the same hand that could snap it.

    • Always: The object can always be snapped.

  • Selection Gesture: Gesture that must be performed to select the object when it's a candidate.

  • Min Gesture Lerp To Select: Minimum gesture lerp to trigger the object selection.

  • Preview Pose: If enabled, ghost hand will be shown while the object is a candidate. Also, the pose point will be calculated each frame which can affect performance.

  • Can Be Attracted: If enabled, the object will move towards slave hand palm. If not, the object will follow hand movements but it will maintain its distance to slave hand palm.*

While Attracted

  • Use Gravity: If disabled (recommended), object won't react to gravity while is being attracted and snapped.

  • Use These Attraction Drives: If enabled, SnappableView.attractionMotionDrive and SnappableView.attractionAngularDrive will be used instead of SnapperModel.attractionMotionDrive and SnapperModel.attractionAngularDrive.

    • Attraction Motion Drive: Motion drive properties that will be applied to the physics constraint (ConfigurableJoint) created to attract the object to hand palm.

    • Attraction Angular Drive: Angular drive properties that will be applied to the physics constraint (ConfigurableJoint) created to attract the object to hand palm.

While Snapped

  • Use These Snap Drives: If enabled, SnappableView.snapMotionDrive and SnappableView.snapAngularDrive will be used instead of SnapperModel.snapMotionDrive and SnapperModel.snapAngularDrive.

    • Snap Motion Drive: Motion drive properties that will be applied to the physics constraint (ConfigurableJoint) created to maintain the object attached to hand palm.

    • Snap Angular Drive: Angular drive properties that will be applied to the physics constraint (ConfigurableJoint) created to maintain the object attached to hand palm.

On Release

  • Recover Gravity: If enabled, object will react to gravity after being unsnapped.

Ignore Collisions

  • Collides With Wrist: If enabled, object will collide with slave wrist bone.

  • Finger Conf: The following variables are finger-specific. They represent how finger bones should behave while the object is snapped:

    • Limit Opening Deeper Than: It limits how much the finger can be opened. The maximum angle is defined by the grabbing pose.

      • Set -1 to let the finger be opened without restrictions (all bones unlocked).

      • Set 0 to lock all finger bones.

      • Set 1 to unlock only distal bones.

    • Limit Closing Deeper Than: It limits how much the finger can be flexed. The minimum angle is defined by the grabbing pose.

      • Set -1 to let the finger be closed without restrictions (all bones unlocked).

      • Set 0 to lock all finger bones.

      • Set 1 to unlock only distal bones.

    • Ignore Collisions Until Depth: Bones closer to finger tip can ignore collisions with the object.

      • Set -1 to make all finger bones able to collide with object.

      • Set 0 to ignore collissions only between the object and distal bone.

      • Set 1 to ignore collissions between the object and both distal and middle bones.

Events

  • On Attract: Invoked when the object is attracted by a Snapper module.

  • On Snap: Invoked when the object is snapped by a Snapper module.

  • On Unsnap: Invoked when the object is unsnapped by a Snapper module.

Properties

  • Posable: PosableView component found automatically.

  • SnappedBy: List of SnapperViews that are snapping the object.

Last updated