๐Ÿ‘‹
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 Animator
  • Public Variables
  • Properties
  • Public Methods
  1. Auto Hand
  2. Hand

Hand Animator

PreviousHand FollowNextFinger Component

Last updated 11 months ago

Hand Animator

The HandAnimator class is responsible for managing the animation and pose transitions of a hand in Unity. It uses the HandPoseData struct to represent various hand poses and smoothly transitions between them based on user inputs or interactions with HandPoseArea components.

Public Variables

  • Default Pose Transition Time : The default time it takes to transition between poses.

  • Default Pose Transition Curve : The default animation curve used for transitioning between poses.

Properties

  • Open Hand Pose : Returns a reference to the HandPoseData representing the open hand pose.

  • Close Hand Pose : Returns a reference to the HandPoseData representing the closed hand pose.

  • Current Input Pose : Returns a reference to the HandPoseData representing the current input pose.

  • Current Target Pose : Returns a reference to the HandPoseData representing the target pose the hand is transitioning to.

  • Current Hand Pose : Returns a reference to the HandPoseData representing the current hand pose.

  • Current Hand Smooth Pose : Returns a reference to the HandPoseData representing the smoothly interpolated hand pose.

Public Methods

SetTargetPose()

csharpCopy codepublic virtual void SetTargetPose(ref HandPoseData poseData, float transitionTime, AnimationCurve animationCurve)

Sets the target pose for the hand to transition to over a specified duration with a specified animation curve.

Parameters:

  • poseData: The target pose data.

  • transitionTime: The time it takes to transition to the target pose.

  • animationCurve: The animation curve to use for the transition.

SetPose()

csharpCopy codepublic void SetPose(ref HandPoseData pose, float transitionTime, AnimationCurve animationCurve)
public void SetPose(ref HandPoseData pose, float transitionTime)
public void SetPose(ref HandPoseData pose)

Sets the target pose for the hand with various overloads for specifying the transition time and animation curve.

Parameters:

  • pose: The target pose data.

  • transitionTime: (Optional) The time it takes to transition to the target pose. Default is defaultPoseTransitionTime.

  • animationCurve: (Optional) The animation curve to use for the transition. Default is defaultPoseTransitionCurve.

GetCurrentHandPose()

csharpCopy codepublic ref HandPoseData GetCurrentHandPose()

Returns a reference to the current hand pose data, ignoring any objects being held.

Returns:

  • HandPoseData: A reference to the current hand pose data.

CopyHandData()

csharpCopy codepublic void CopyHandData(ref HandPoseData handPose)

Copies the current hand pose data to the specified HandPoseData object, ignoring any objects being held.

Parameters:

  • handPose: The HandPoseData object to copy the current hand pose data to.

CancelPose()

csharpCopy codepublic void CancelPose(float cancelPoseTransitionTime)
public void CancelPose()

Cancels any ongoing pose transitions and returns the hand to its default state over a specified duration.

Parameters:

  • cancelPoseTransitionTime: (Optional) The time it takes to cancel the current pose transition. Default is defaultPoseTransitionTime.

IsPosing()

csharpCopy codepublic bool IsPosing()

Checks if the hand is currently locked into a pose.

Returns:

  • bool: True if the hand is currently posing, otherwise False.

SetTargetPose()

csharpCopy codepublic virtual void SetTargetPose(ref HandPoseData poseData, float transitionTime, AnimationCurve animationCurve)

Sets a new target pose for the hand to transition to, with specified transition time and animation curve.

Parameters:

  • poseData: The pose data to transition to.

  • transitionTime: The duration of the transition.

  • animationCurve: The animation curve for the transition.

SetPose()

csharpCopy codepublic void SetPose(ref HandPoseData pose, float transitionTime, AnimationCurve animationCurve)
public void SetPose(ref HandPoseData pose, float transitionTime)
public void SetPose(ref HandPoseData pose)

Sets a new pose for the hand with optional transition time and animation curve.

Parameters:

  • pose: The pose data to set.

  • transitionTime: The duration of the transition (optional).

  • animationCurve: The animation curve for the transition (optional).

GetCurrentHandPose()

csharpCopy codepublic ref HandPoseData GetCurrentHandPose()

Gets the current pose of the hand.

Returns:

  • HandPoseData: A reference to the current hand pose data.

CopyHandData()

csharpCopy codepublic void CopyHandData(ref HandPoseData handPose)

Copies the current hand pose data to the specified HandPoseData object.

Parameters:

  • handPose: The pose data to copy the current hand pose to.

CancelPose()

csharpCopy codepublic void CancelPose(float cancelPoseTransitionTime)
public void CancelPose()

Cancels the current pose transition and reverts to the default pose.

Parameters:

  • cancelPoseTransitionTime: The time to transition back to the default pose (optional).

IsPosing()

csharpCopy codepublic bool IsPosing()

Checks if the hand is currently in a pose transition or locked into a pose.

Returns:

  • bool: True if the hand is posing, False otherwise.

Current Pose Area : The current the hand is interacting with.

Hand Pose Data Non Alloc : Returns a reference to the non-allocated used for temporary calculations.

๐Ÿ™Œ
๐Ÿ–๏ธ
๐Ÿซณ
HandPoseData
HandPoseArea