cvr-props/Assets/ABI.CCK/Components/CVRAttachment.cs

84 lines
2 KiB
C#
Raw Normal View History

2023-07-30 01:20:46 +02:00
using System.Collections.Generic;
using UnityEngine;
2023-01-22 16:38:23 +01:00
using UnityEngine.Events;
namespace ABI.CCK.Components
{
public class CVRAttachment : MonoBehaviour
{
[System.Flags]
public enum AttachmentType
{
Bone = 1,
Tracker = 2,
2023-07-30 01:20:46 +02:00
SnappingPoint = 4,
2023-01-22 16:38:23 +01:00
}
public AttachmentType attachmentType;
[System.Flags]
public enum BoneType
{
Hips = 1,
Spine = 2,
Chest = 4,
UpperChest = 8,
Neck = 16,
Head = 32,
LeftUpperLeg = 64,
LeftLowerLeg = 128,
LeftFoot = 256,
RightUpperLeg = 512,
RightLowerLeg = 1024,
RightFoot = 2048,
LeftShoulder = 4096,
LeftArm = 8192,
LeftForearm = 16384,
LeftHand = 32768,
RightShoulder = 65536,
RightArm = 131072,
RightForearm = 262144,
RightHand = 524288,
Root = 1048576
}
public BoneType boneType = 0;
[System.Flags]
public enum TrackerType
{
MainCamera = 1,
RightHand = 2,
LeftHand = 4,
AdditionalTracker = 8
}
public TrackerType trackerType = 0;
2023-07-30 01:20:46 +02:00
public List<string> snappingPointTypes = new List<string>();
2023-01-22 16:38:23 +01:00
public bool useFixedPositionOffset = false;
public bool useFixedRotationOffset = false;
public Vector3 positionOffset;
public Vector3 rotationOffset;
public float maxAttachmentDistance = 0f;
[SerializeField]
public UnityEvent onAttach;
[SerializeField]
public UnityEvent onDeattach;
public void Attach()
{
}
public void DeAttach()
{
}
}
}