add package files

This commit is contained in:
VR164000
2023-06-15 09:52:08 +08:00
parent 06d41412be
commit a0b3b91879
382 changed files with 44971 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace VIVE.HandTracking.Sample
{
public class SwitchHand : MonoBehaviour
{
public InputMaster inputMaster;
public GameObject hand3D;
public GameObject handSkeleton;
private bool isSwitch = false;
private void Awake()
{
inputMaster = new InputMaster();
inputMaster.Enable();
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
float ispressed = inputMaster.Keyboard.SpacePress.ReadValue<float>();
if (ispressed > 0.5)
{
if(!isSwitch)
{
UnityEngine.Debug.Log("press space");
hand3D.SetActive(!hand3D.activeSelf);
handSkeleton.SetActive(!handSkeleton.activeSelf);
isSwitch = true;
}
}
else
{
isSwitch = false;
}
}
}
}