You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
|
1 month ago
|
using System;
|
||
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace UDE_HAND_INTERACTION
|
||
|
|
{
|
||
|
|
[CreateAssetMenu(fileName = "Data", menuName = "FingerInteractData", order = 1)]
|
||
|
|
public class FingerInteractData : ScriptableObject
|
||
|
|
{
|
||
|
|
//[HideInInspector]
|
||
|
|
//public List<Finger> fingers;
|
||
|
|
//[HideInInspector]
|
||
|
|
//public HandInteractor.InteractType interactType;
|
||
|
|
[HideInInspector]
|
||
|
|
public float ActiveRange = 0.08f;
|
||
|
|
[HideInInspector]
|
||
|
|
public KeyCode ShortcutKeyCode;
|
||
|
|
}
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class Finger
|
||
|
|
{
|
||
|
|
public string Name;
|
||
|
|
[HideInInspector]
|
||
|
|
public int MaxAngle = 80;
|
||
|
|
public bool IsActive = false;
|
||
|
|
public float Threshold = 0.6f;
|
||
|
|
|
||
|
|
public Finger(string name, bool isActive = false, float threshold = 0.6f, int maxAngle = 80)
|
||
|
|
{
|
||
|
|
Name = name;
|
||
|
|
MaxAngle = maxAngle;
|
||
|
|
IsActive = isActive;
|
||
|
|
Threshold = threshold > 1 ? 1 : threshold;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|