1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using SC.InputSystem;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class ModifyHand : MonoBehaviour {
- public InputDevicePartType partType;
- Vector3 offset = new Vector3(0f, 0f, 0f);
- float fv = 0.01f;//每次调节1cm
- bool displayHandLine = true;
- public void HandLine() {
- displayHandLine = !displayHandLine;
- if(InputSystem.Instant.Gesture26Dof) {
- foreach(var part in InputSystem.Instant.Gesture26Dof.InputDevice26DofGesturePartList) {
- if(part.PartType == partType) {
- part.DisplayFingerLineRender(displayHandLine);
- }
- }
- }
- }
- bool displayJoint = false;
- public void Joint() {
- displayJoint = !displayJoint;
- if(InputSystem.Instant.Gesture26Dof) {
- foreach(var part in InputSystem.Instant.Gesture26Dof.InputDevice26DofGesturePartList) {
- if(part.PartType == partType) {
- part.DisplayFingerDetecter(displayJoint);
- }
- }
- }
- }
- bool turnOffRay = true;
- public void Ray() {
- turnOffRay = !turnOffRay;
- if(InputSystem.Instant.Gesture26Dof) {
- foreach(var part in InputSystem.Instant.Gesture26Dof.InputDevice26DofGesturePartList) {
- if(part.PartType == partType) {
- part.SetRay(turnOffRay);
- }
- }
- }
- }
- bool turnOffTouch = true;
- public void Touch() {
-
- turnOffTouch = !turnOffTouch;
- if(InputSystem.Instant.Gesture26Dof) {
- foreach(var part in InputSystem.Instant.Gesture26Dof.InputDevice26DofGesturePartList) {
- if(part.PartType == partType) {
- part.SetTouch(turnOffTouch);
- }
- }
- }
- }
- }
|