Add hand
This commit is contained in:
27
Assets/Oculus Hands/Scripts/AnimationHandOnInout.cs
Normal file
27
Assets/Oculus Hands/Scripts/AnimationHandOnInout.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
|
||||
public class AnimationHandOnInout : MonoBehaviour
|
||||
{
|
||||
public InputActionProperty pinchAnimationAction;
|
||||
public InputActionProperty gripAnimationAction;
|
||||
public Animator handAnimator;
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
float triggerValue = pinchAnimationAction.action.ReadValue<float>();
|
||||
handAnimator.SetFloat("Trigger", triggerValue);
|
||||
|
||||
float gripValue = gripAnimationAction.action.ReadValue<float>();
|
||||
handAnimator.SetFloat("Grip", gripValue);
|
||||
|
||||
}
|
||||
}
|
11
Assets/Oculus Hands/Scripts/AnimationHandOnInout.cs.meta
Normal file
11
Assets/Oculus Hands/Scripts/AnimationHandOnInout.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1dd9ec91e912fe642a780e817e0b5560
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user