๐Ÿ‘‹
Auto Hand Docs
  • ๐Ÿ™ŒAuto Hand
    • โ€ผ๏ธAuto Hand V4 What's-New
    • โšกSetup
    • ๐Ÿ—’๏ธFAQ
    • โ‰๏ธCommon Issues
    • ๐ŸงคSetup New Hand
    • ๐ŸŽฎController Input
      • โœŠHand Input
      • ๐ŸคŸHand Tracking Input
      • โœŒ๏ธFinger Pose Input
      • ๐ŸƒPlayer Input
      • ๐Ÿ—’๏ธGeneral Input / UI Pointer Input
      • ๐Ÿ‘ˆDistance Grabber Input
      • โšกTeleport Input
      • ๐ŸŽAdditional Input
    • ๐Ÿ–๏ธHand
      • ๐Ÿ”ฆGrabbable Highlighter
      • ๐Ÿ‘‹Hand Follow
      • ๐ŸซณHand Animator
      • โ˜๏ธFinger Component
      • ๐ŸงคHand Projector
    • ๐Ÿ––Hand Tracking
      • ๐Ÿ‘ŒHand Tracking Finger Gesture Tracking
      • ๐Ÿ‘ˆHand Tracking Pose Gesture Tracking
    • โœ๏ธCustom Poses
      • ๐ŸฆพHand Pose Data
      • โœ‚๏ธAnimated Held Poses
    • ๐Ÿ…Grabbable
      • ๐ŸงฒDistance Grabbing
    • ๐ŸงบPlace Point
    • ๐Ÿ“คDispenser Point
    • ๐Ÿ›ธTeleportation
    • ๐Ÿ‘ŸAuto Hand Player
    • ๐ŸงFull Body (VRIK)
    • โš’๏ธExtras
      • ๐Ÿ”ซAuto Gun
        • ๐Ÿ’˜Auto Ammo
        • ๐ŸŽฏAuto Gun Target
      • โš™๏ธGrabbable Held Joint
      • ๐ŸŽ›๏ธPhysics Gadgets
        • ๐Ÿ”˜Physics Gadget Button
        • ๐ŸŽš๏ธPhysics Gadget Slider
        • ๐ŸŽ›๏ธPhysics Gadget Lever
      • ๐Ÿ“UI Interaction
      • ๐Ÿ“ฑHand Touch / Trigger
      • ๐Ÿ”จSmashing
      • ๐Ÿ”ชStabbing
      • ๐ŸŽฏStickies
      • ๐ŸงฒMagnetic Forces
      • ๐Ÿ“ขCollision Sounds
      • โŒšWrist Look Event
Powered by GitBook
On this page
  • Hand Grabbable Highlighter
  • Public Variables
  • Public Methods
  1. Auto Hand
  2. Hand

Grabbable Highlighter

PreviousHandNextHand Follow

Last updated 11 months ago

Hand Grabbable Highlighter

The HandGrabbableHighlighter class manages the highlighting of grabbable objects within reach of a hand in Unity. It periodically updates the highlighted object based on the hand's position and orientation.

Public Variables

  • Palm Forward Right Direction : When choosing between multiple targets to highlight, the hand will favor objects in the palm's local forward direction (0) or the palm's local right direction (1), or a blend between the two (recommended 0.5-0.75).

Public Methods

GetHighlightHit

csharpCopy codepublic RaycastHit GetHighlightHit()

Returns the closest raycast hit from the hand's highlighting system. If no highlight is present, returns a blank raycasthit.

Returns:

  • RaycastHit: The closest raycast hit.

HandClosestHit

csharpCopy codepublic virtual Vector3 HandClosestHit(out RaycastHit closestHit, out IGrabbableEvents grabbable, float dist, int layerMask, Grabbable target = null)

Finds the closest raycast hit from a cone of rays and returns the average direction of all hits.

Parameters:

  • closestHit: Outputs the closest raycast hit.

  • grabbable: Outputs the closest grabbable object.

  • dist: The distance to check for hits.

  • layerMask: The layer mask to use for raycasting.

  • target: An optional target grabbable object to check for.

Returns:

  • Vector3: The average direction of all hits.

๐Ÿ™Œ
๐Ÿ–๏ธ
๐Ÿ”ฆ