text
stringlengths 0
1.11k
|
|---|
To ensure your pose is a thumbs up and not something similar but incorrect, like a thumbs down, define the pose’s orientation to be the wrist facing upwards in world space.
|
Under Hierarchy, select the ThumbsUpPoseLeft GameObject.
|
Under Inspector, in the TransformRecognizerActiveState component, set the Hand property to LeftHand.
|
Set the Transform Feature State Provider property to HandFeaturesLeft to get the left hand’s transform data.
|
In the Transform Feature Configs dropdown, select Wrist Up to define the correct orientation as the wrist facing up.
|
Under Transform Config, in the Up Vector Type dropdown, select World to define the wrist orientation as relative to world space.
|
Set the Feature Thresholds property to DefaultTransformFeatureStateThresholds by clicking the circle in the property’s textbox and searching for DefaultTransformFeatureStateThresholds. This is a set of default threshold definitions created by the SDK team.
|
Repeat these steps for the ThumbsUpPoseRight GameObject.
|
Combine the shapes and orientation
|
So far you’ve defined the shapes and the orientation that together make a thumbs up. Now it’s time to check the shapes and orientation simultaneously. To check both simultaneously, you’ll combine the shapes and orientation in an Active State Group. This group becomes active when the tracked hand matches all of the required shapes and orientation.
|
Under Hierarchy, select the ThumbsUpPoseLeft GameObject.
|
In the Active State Group component, add two elements to the list.
|
Set Element 0 to the ThumbsUpPoseLeft GameObject.
|
A list of options appears.
|
Select ShapeRecognizerActiveState from the list.
|
Set Element 1 to the ThumbsUpPoseLeft GameObject.
|
A list of options appears.
|
Select TransformRecognizerActiveState from the list.
|
Repeat these steps for the ThumbsUpPoseRight GameObject.
|
Track the state of the pose
|
To track if the pose is happening, you use the ActiveStateSelector component, which tracks an active state and fires its WhenSelected and WhenUnselected events based on the tracked state.
|
Under Hierarchy, select the ThumbsUpPoseLeft GameObject.
|
In the Active State Selector component you added earlier, set the Active State property to the ThumbsUpPoseLeft GameObject.
|
A list of options appears.
|
Select ActiveStateGroup from the list since you want to track the combined state of the shapes and orientation, not the individual states.
|
Repeat these steps for the ThumbsUpPoseRight GameObject.
|
Choose events to fire
|
The ActiveStateSelector’s events aren’t exposed in the Unity inspector, so to access these events in the Inspector, you pass the ActiveStateSelector to a SelectorUnityEventWrapper component. SelectorUnityEventWrapper lets you run custom logic based on the event that’s occurring.
|
Under Hierarchy, select the ThumbsUpPoseLeft GameObject.
|
In the Selector Unity Event Wrapper component, set the Selector property to the ThumbsUpPose GameObject.
|
Add your own custom functions to the When Selected() list, the When Unselected() list, or both. These functions will trigger when a thumbs up starts or stops.
|
Repeat these steps for the ThumbsUpPoseRight GameObject.
|
A canvas displaying the status of the Thumbs Up pose
|
The finished Thumbs Up pose using an Active State Debug Tree UI component to display the current state of the left hand.
|
Related topics
|
To understand the concepts and components used to detect a pose, see Hand Pose Detection.
|
To learn about the concept of Active State, see Active State Overview.
|
To practice using the basics of Active State, see Use Active State.
|
To learn how to detect custom body poses, see Compare Body Poses.Create a Hand Grab Pose (PC)
|
Unity
|
All-In-One VR
|
Quest
|
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).
|
Haz clic aquí para ver la página del índice de la documentación para tu plataforma de preferencia.
|
In this tutorial, you learn how to record a custom hand grab pose with Interaction SDK to control how your hands conform to a grabbed object. Once you record a pose, you can adjust its fingers and scale, mirror, and enable it to work with different surfaces.
|
This tutorial is only for Android devices because it requires Oculus Link. For the Mac version of this tutorial, see Create a Hand Grab Pose (Mac). To try pose recognition in a pre-built scene, see the PoseExamples scene.
|
Note
|
This tutorial requires Oculus Link, which doesn't support Mac, so you can't use a Mac for this tutorial.
|
Before you begin
|
Connect Oculus Link to your Unity Editor. Oculus Link requires the Android platform and isn’t supported on Mac.
|
Complete Getting Started with Interaction SDK.
|
Add a hand grab interaction using QuickActions.
|
Configure the settings
|
Before you can record poses for an object, there are a few settings you need to configure.
|
Open the Unity scene where you want to record hand grab poses.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.