Update package file to 1.0.13

This commit is contained in:
Andy_YC_Chen
2023-06-26 16:37:49 +08:00
parent 2c956c9090
commit 8c0baa899c
11 changed files with 32 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ To help software developers create an application for locating hand joints with
1. **Edit** > **Project Settings** > **XR Plug-in Management** > Select **OpenXR** , click Exclamation mark next to it then choose **Fix All**.
2. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Add Interaction profiles for your device.
3. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Select **Hand Tracking** under **VIVE OpenXR** Feature Groups.
4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.12** > **HandTracking Example** > **Scenes** > **HandTrackingScene.unity** then click Play.
4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.13** > **HandTracking Example** > **Scenes** > **HandTrackingScene.unity** then click Play.
## Use VIVE OpenXR Hand Tracking Unity Feature to draw skeleton hand.
1. Import VIVE OpenXR Plugin - Windows

View File

@@ -2,7 +2,7 @@
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.4.1
// from Assets/Samples/VIVE OpenXR Plugin - Windows/1.0.12/HandTracking Example/Scripts/InputMaster.inputactions
// from Assets/Samples/VIVE OpenXR Plugin - Windows/1.0.13/HandTracking Example/Scripts/InputMaster.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View File

@@ -3,6 +3,11 @@ using UnityEngine.InputSystem;
using UnityEngine.UI;
using UnityEngine;
#if USE_INPUT_SYSTEM_POSE_CONTROL
using Pose = UnityEngine.InputSystem.XR.PoseState;
#else
using Pose = UnityEngine.XR.OpenXR.Input.Pose;
#endif
public class LineRender : MonoBehaviour
{
@@ -22,7 +27,7 @@ public class LineRender : MonoBehaviour
&& actionReferencePose.action.enabled && actionReferencePose.action.controls.Count > 0)
{
//GazeRayRenderer.SetActive(true);
UnityEngine.XR.OpenXR.Input.Pose poseval = actionReferencePose.action.ReadValue<UnityEngine.XR.OpenXR.Input.Pose>();
Pose poseval = actionReferencePose.action.ReadValue<Pose>();
Quaternion gazeRotation = poseval.rotation;
Quaternion orientation = new Quaternion(
1 * (gazeRotation.x),