version 2.2.0

This commit is contained in:
srl87
2024-01-10 14:20:05 +08:00
parent 11b730e79b
commit 45b4e46f74
211 changed files with 107849 additions and 1160 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d666d7e462cfc904b8684b09ffaab15f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: eff108a5209eb0a48804dfdba0dabb63
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,285 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8419823203306955676
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8419823203306955648}
- component: {fileID: 8419823203306955651}
- component: {fileID: 8419823203306955650}
- component: {fileID: 8419823203306955677}
m_Layer: 0
m_Name: CustomGestureDefiner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8419823203306955648
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8419823203306955676}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.63137037, y: 1.8553617, z: -2.3483706}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8419823203306955651
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8419823203306955676}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a4717f5ed1f0b0a4a8a1aa02c8d30b06, type: 3}
m_Name:
m_EditorClassIdentifier:
LFingers:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
RFingers:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
CurrentGestureL: {fileID: 0}
CurrentGestureR: {fileID: 0}
CurrentGestureDual: {fileID: 0}
--- !u!114 &8419823203306955650
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8419823203306955676}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1fc3b0937a9ed7d4a82e0a0c262beaf4, type: 3}
m_Name:
m_EditorClassIdentifier:
ThumbDefiner:
StraightDistalLowBound: 150
StraightIntermediateLowBound: 150
StraightProximalLowBound: 150
BendingDistalLowBound: 140
BendingIntermediateLowBound: 140
BendingProximalLowBound: 140
IndexDefiner:
StraightDistalLowBound: 160
StraightIntermediateLowBound: 160
StraightProximalLowBound: 160
BendingDistalLowBound: 120
BendingIntermediateLowBound: 120
BendingProximalLowBound: 120
MiddleDefiner:
StraightDistalLowBound: 160
StraightIntermediateLowBound: 160
StraightProximalLowBound: 160
BendingDistalLowBound: 120
BendingIntermediateLowBound: 120
BendingProximalLowBound: 120
RingDefiner:
StraightDistalLowBound: 160
StraightIntermediateLowBound: 160
StraightProximalLowBound: 160
BendingDistalLowBound: 120
BendingIntermediateLowBound: 120
BendingProximalLowBound: 120
PinkyDefiner:
StraightDistalLowBound: 160
StraightIntermediateLowBound: 160
StraightProximalLowBound: 160
BendingDistalLowBound: 120
BendingIntermediateLowBound: 120
BendingProximalLowBound: 120
--- !u!114 &8419823203306955677
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8419823203306955676}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d622bde162fe6524aa1cf99ee5bbda11, type: 3}
m_Name:
m_EditorClassIdentifier:
DefinedGestures:
- GestureName: Fist
TargetHand: 3
ThumbStatus: 0
IndexStatus: 0
MiddleStatus: 0
RingStatus: 0
PinkyStatus: 0
ThumbStatusIs: 3
IndexStatusIs: 3
MiddleStatusIs: 3
RingStatusIs: 3
PinkyStatusIs: 4
DualHandDistance: 0
DualNear: 0
DualFar: 0
ThumbIndexDistance: 0
SingleNear: 0
SingleFar: 0
- GestureName: Point
TargetHand: 3
ThumbStatus: 3
IndexStatus: 1
MiddleStatus: 3
RingStatus: 3
PinkyStatus: 0
ThumbStatusIs: 3
IndexStatusIs: 1
MiddleStatusIs: 4
RingStatusIs: 4
PinkyStatusIs: 4
DualHandDistance: 0
DualNear: 0
DualFar: 0
ThumbIndexDistance: 0
SingleNear: 0
SingleFar: 0
- GestureName: Victory
TargetHand: 3
ThumbStatus: 3
IndexStatus: 1
MiddleStatus: 1
RingStatus: 3
PinkyStatus: 0
ThumbStatusIs: 4
IndexStatusIs: 1
MiddleStatusIs: 1
RingStatusIs: 4
PinkyStatusIs: 4
DualHandDistance: 0
DualNear: 0
DualFar: 0
ThumbIndexDistance: 2
SingleNear: 0
SingleFar: 0
- GestureName: OK
TargetHand: 3
ThumbStatus: 3
IndexStatus: 1
MiddleStatus: 1
RingStatus: 1
PinkyStatus: 0
ThumbStatusIs: 6
IndexStatusIs: 4
MiddleStatusIs: 6
RingStatusIs: 6
PinkyStatusIs: 6
DualHandDistance: 0
DualNear: 0
DualFar: 0
ThumbIndexDistance: 1
SingleNear: 3
SingleFar: 5.5
- GestureName: Like
TargetHand: 3
ThumbStatus: 3
IndexStatus: 1
MiddleStatus: 1
RingStatus: 1
PinkyStatus: 0
ThumbStatusIs: 6
IndexStatusIs: 3
MiddleStatusIs: 3
RingStatusIs: 3
PinkyStatusIs: 3
DualHandDistance: 0
DualNear: 0
DualFar: 0
ThumbIndexDistance: 2
SingleNear: 3
SingleFar: 5.5
- GestureName: Five
TargetHand: 3
ThumbStatus: 1
IndexStatus: 1
MiddleStatus: 1
RingStatus: 1
PinkyStatus: 0
ThumbStatusIs: 6
IndexStatusIs: 1
MiddleStatusIs: 1
RingStatusIs: 1
PinkyStatusIs: 1
DualHandDistance: 0
DualNear: 0
DualFar: 0
ThumbIndexDistance: 0
SingleNear: 0
SingleFar: 0
- GestureName: Rock
TargetHand: 3
ThumbStatus: 1
IndexStatus: 1
MiddleStatus: 3
RingStatus: 3
PinkyStatus: 0
ThumbStatusIs: 1
IndexStatusIs: 1
MiddleStatusIs: 3
RingStatusIs: 3
PinkyStatusIs: 1
DualHandDistance: 0
DualNear: 0
DualFar: 0
ThumbIndexDistance: 0
SingleNear: 0
SingleFar: 0
- GestureName: Vive
TargetHand: 4
ThumbStatus: 1
IndexStatus: 1
MiddleStatus: 3
RingStatus: 3
PinkyStatus: 0
ThumbStatusIs: 6
IndexStatusIs: 6
MiddleStatusIs: 0
RingStatusIs: 0
PinkyStatusIs: 0
DualHandDistance: 1
DualNear: 10
DualFar: 20
ThumbIndexDistance: 2
SingleNear: 5
SingleFar: 10
- GestureName: Push
TargetHand: 4
ThumbStatus: 1
IndexStatus: 1
MiddleStatus: 3
RingStatus: 3
PinkyStatus: 0
ThumbStatusIs: 1
IndexStatusIs: 1
MiddleStatusIs: 1
RingStatusIs: 1
PinkyStatusIs: 1
DualHandDistance: 2
DualNear: 10
DualFar: 20
ThumbIndexDistance: 0
SingleNear: 5
SingleFar: 10

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d40280e42e98ad344b4cc9286448e6ff
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 760bbc4da8f43814c8291367d09bc819
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,162 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using VIVE.OpenXR.Hand;
using VIVE.OpenXR.Toolkits.CustomGesture;
public class DebugHandGesture : MonoBehaviour
{
public Text[] LFingers;
public Text[] RFingers;
public Text CurrentGestureL;
public Text CurrentGestureR;
public Text CurrentGestureDual;
CustomGestureManager HGM;
CustomGestureDefiner GD;
void Start()
{
GD = GetComponent<CustomGestureDefiner>();
HGM = GetComponent<CustomGestureManager>();
}
void Update()
{
UpdateFingerStatus(CGEnums.HandFlag.Left); //get real left hand finger status
UpdateFingerStatus(CGEnums.HandFlag.Right); //get real right hand finger status
ShowCurrentGesture();
}
void ShowCurrentGesture()
{
CurrentGestureL.text = "LGesture: " + "No Gesture";
CurrentGestureR.text = "RGesture: " + "No Gesture";
CurrentGestureDual.text = "DualGesture: " + "No Gesture";
if (!IsGestureReady())
return;
foreach (CustomGesture _Gestures in GD.DefinedGestures)
{
switch (_Gestures.TargetHand)
{
case CGEnums.HandFlag.Either:
//check left hand gesture
if (CustomGestureDefiner.IsCurrentGestureTriiggered(_Gestures.GestureName, CGEnums.HandFlag.Left) && CheckHandValid(CGEnums.HandFlag.Left))
CurrentGestureL.text = "LGesture: " + _Gestures.GestureName;
//check right hand gesture
if (CustomGestureDefiner.IsCurrentGestureTriiggered(_Gestures.GestureName, CGEnums.HandFlag.Right) && CheckHandValid(CGEnums.HandFlag.Right))
CurrentGestureR.text = "RGesture: " + _Gestures.GestureName;
//Debug.Log("DebugHandGesture ShowCurrentGesture() " + _Gestures.GestureName);
break;
case CGEnums.HandFlag.Dual:
if (CustomGestureDefiner.IsCurrentGestureTriiggered(_Gestures.GestureName, CGEnums.HandFlag.Dual) && CheckHandValid(CGEnums.HandFlag.Left) && CheckHandValid(CGEnums.HandFlag.Right))
{
CurrentGestureDual.text = "DualGesture: " + _Gestures.GestureName;
}
break;
default:
CurrentGestureL.text = "LGesture: " + "No Gesture";
CurrentGestureR.text = "RGesture: " + "No Gesture";
CurrentGestureDual.text = "DualGesture: " + "No Gesture";
break;
}
}
}
void UpdateFingerStatus(CGEnums.HandFlag _Hand)
{
Text[] _Fingers = (_Hand == CGEnums.HandFlag.Left) ? LFingers : RFingers;
_Fingers[0].text = HGM.GetFingerStatus(_Hand, CGEnums.FingerFlag.Thumb).ToString();
_Fingers[1].text = HGM.GetFingerStatus(_Hand, CGEnums.FingerFlag.Index).ToString();
_Fingers[2].text = HGM.GetFingerStatus(_Hand, CGEnums.FingerFlag.Middle).ToString();
_Fingers[3].text = HGM.GetFingerStatus(_Hand, CGEnums.FingerFlag.Ring).ToString();
_Fingers[4].text = HGM.GetFingerStatus(_Hand, CGEnums.FingerFlag.Pinky).ToString();
}
bool CheckHandValid(CGEnums.HandFlag _Hand) {
HandJoint[] _Joints = CustomGestureManager.GetHandJointLocations(_Hand);
//Debug.Log("CheckHandValid() 0:" + _Joints[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].isValid + ", 1:" +
//_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_WRIST_EXT].isValid + ", 2:" +
//_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_TIP_EXT].isValid + ", 3:" +
//_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_TIP_EXT].isValid + ", 4:" +
//_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_TIP_EXT].isValid);
if (!(_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_WRIST_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_TIP_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_PROXIMAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_METACARPAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_PROXIMAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_INTERMEDIATE_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_DISTAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_TIP_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_METACARPAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_PROXIMAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_INTERMEDIATE_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_DISTAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_TIP_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_RING_METACARPAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_RING_PROXIMAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_RING_INTERMEDIATE_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_RING_DISTAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_RING_TIP_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_METACARPAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_PROXIMAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_INTERMEDIATE_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_DISTAL_EXT].isValid &&
_Joints[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_TIP_EXT].isValid))
{
//Debug.Log("DebugHandGesture CheckHandValid() not valid hand: "+ _Hand);
return false;
}
//Debug.Log("DebugHandGesture CheckHandValid() valid hand: " + _Hand);
return true;
}
bool IsGestureReady() {
HandJoint[] _JointsL = CustomGestureManager.GetHandJointLocations(CGEnums.HandFlag.Left);
HandJoint[] _JointsR = CustomGestureManager.GetHandJointLocations(CGEnums.HandFlag.Right);
//Debug.Log("IsGestureReady left before: " + HandTracking.GetHandJointLocations(HandFlag.Left)[0].isValid + ", " +
//_JointsL[1].isValid + ", " + _JointsL[2].isValid + ", " + _JointsL[3].isValid + ", " + _JointsL[4].isValid + ", " +
//_JointsL[5].isValid + ", " + _JointsL[6].isValid + ", " + _JointsL[7].isValid + ", " + _JointsL[8].isValid + ", " +
//_JointsL[9].isValid + ", " + _JointsL[10].isValid + ", " + _JointsL[11].isValid + ", " + _JointsL[12].isValid + ", " +
//_JointsL[13].isValid + ", " + _JointsL[14].isValid + ", " + _JointsL[15].isValid + ", " + _JointsL[16].isValid + ", " +
//_JointsL[17].isValid + ", " + _JointsL[18].isValid + ", " + _JointsL[19].isValid + ", " + _JointsL[20].isValid);*/
if (_JointsL[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].position.x == 0 &&
_JointsL[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].position.y == 0 &&
_JointsL[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].position.z == 0 &&
_JointsR[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].position.x == 0 &&
_JointsR[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].position.y == 0 &&
_JointsR[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT].position.z == 0)
{
//Debug.Log("IsGestureReady left palm before: " + _JointsL[0].position.x + ", " + _JointsL[0].position.y + ", " + _JointsL[0].position.z);
//Debug.Log("IsGestureReady right palm before: " + _JointsR[0].position.x + ", " + _JointsR[0].position.y + ", " + _JointsR[0].position.z);
//Debug.Log("IsGestureReady left wrist before: " + _JointsL[1].position.x + ", " + _JointsL[1].position.y + ", " + _JointsL[1].position.z);
//Debug.Log("IsGestureReady right wrist before: " + _JointsR[1].position.x + ", " + _JointsR[1].position.y + ", " + _JointsR[1].position.z);
//Debug.Log("DebugHandGesture IsGestureReady() not ready");
return false;
}
//Vector3 _LBone1Dir = Vector3.zero, _LBone2Dir = Vector3.zero, _RBone1Dir = Vector3.zero, _RBone2Dir = Vector3.zero;
//HandJoint[] _LJoints = /*HandTracking.*/CustomGestureManager.GetHandJointLocations(HandFlag.Left);
//_LBone1Dir = _LJoints[(int)(XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT + 1)].position - _LJoints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT].position;
//_LBone2Dir = _LJoints[(int)(XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT - 1)].position - _LJoints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT].position;
//Debug.Log("IsGestureReady left : " + Vector3.Angle(_LBone1Dir, _LBone2Dir));
//HandJoint[] _RJoints = /*HandTracking.*/CustomGestureManager.GetHandJointLocations(HandFlag.Right);
//_RBone1Dir = _RJoints[(int)(XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT + 1)].position - _RJoints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT].position;
//_RBone2Dir = _RJoints[(int)(XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT - 1)].position - _RJoints[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT].position;
//Debug.Log("IsGestureReady right : " + Vector3.Angle(_RBone1Dir, _RBone2Dir));
return true;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a4717f5ed1f0b0a4a8a1aa02c8d30b06
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -4,6 +4,7 @@ using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.UI;
using UnityEngine.XR;
using UnityEngine.XR.OpenXR;
namespace VIVE.OpenXR.Samples.OpenXRInput
{
@@ -159,9 +160,12 @@ namespace VIVE.OpenXR.Samples.OpenXRInput
private float GetRefreshRate()
{
if (XR_FB_display_refresh_rate.GetDisplayRefreshRate(out float rate) == XrResult.XR_SUCCESS) { return rate; }
if (!OpenXRRuntime.IsExtensionEnabled("XR_FB_display_refresh_rate"))
return 0.0f;
return 0;
if (XR_FB_display_refresh_rate.GetDisplayRefreshRate(out float rate) == XrResult.XR_SUCCESS) { return rate; }
return 0.0f;
}
}
}

View File

@@ -0,0 +1,118 @@
// Copyright HTC Corporation All Rights Reserved.
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.XR;
namespace VIVE.OpenXR.Samples.OpenXRInput
{
[RequireComponent(typeof(Text))]
public class InputDevicesText : MonoBehaviour
{
public bool useXrNode = false;
public bool useRole = false;
public int StartIndex = 0, EndIndex = 0;
private Text m_Text = null;
private void Awake()
{
m_Text = GetComponent<Text>();
}
private readonly XRNode[] s_XrNodes = new XRNode[]
{
XRNode.LeftEye, // 0
XRNode.RightEye,
XRNode.CenterEye,
XRNode.Head,
XRNode.LeftHand,
XRNode.RightHand, // 5
XRNode.TrackingReference,
XRNode.HardwareTracker,
};
private readonly InputDeviceRole[] s_DeviceRoles = new InputDeviceRole[]
{
InputDeviceRole.Generic, // 0
InputDeviceRole.LeftHanded,
InputDeviceRole.RightHanded,
InputDeviceRole.GameController,
InputDeviceRole.TrackingReference,
InputDeviceRole.HardwareTracker, // 5
InputDeviceRole.LegacyController,
};
private readonly InputDeviceCharacteristics[] s_Characteristics = new InputDeviceCharacteristics[]
{
InputDeviceCharacteristics.HeadMounted, // 0
InputDeviceCharacteristics.Camera,
InputDeviceCharacteristics.HeldInHand,
InputDeviceCharacteristics.HandTracking,
InputDeviceCharacteristics.EyeTracking,
InputDeviceCharacteristics.TrackedDevice, // 5
InputDeviceCharacteristics.Controller,
InputDeviceCharacteristics.TrackingReference,
InputDeviceCharacteristics.Left,
InputDeviceCharacteristics.Right,
InputDeviceCharacteristics.Simulated6DOF,
};
internal static List<InputDevice> s_InputDevicesXrNode = new List<InputDevice>();
internal static List<InputDevice> s_InputDevices = new List<InputDevice>();
internal static List<InputDevice> s_InputDevicesRole = new List<InputDevice>();
private void Update()
{
if (m_Text == null) { return; }
if (useXrNode)
{
m_Text.text = "";
//for (int node = 0; node < s_XrNodes.Length; node++)
{
InputDevices.GetDevicesAtXRNode(s_XrNodes[7], s_InputDevicesXrNode);
m_Text.text += "Node " + s_XrNodes[7] + " (" + s_InputDevicesXrNode.Count + "):\n";
for (int i = 0; i < s_InputDevicesXrNode.Count; i++)
{
m_Text.text += "\n" + i + "." + s_InputDevicesXrNode[i].name;
m_Text.text += "\n characteristics: " + s_InputDevicesXrNode[i].characteristics;
m_Text.text += "\n serialNumber: " + s_InputDevicesXrNode[i].serialNumber;
m_Text.text += "\n";
}
m_Text.text += "\n";
}
return;
}
if (useRole)
{
m_Text.text = "";
//for (int role = 0; role < s_DeviceRoles.Length; role++)
{
#pragma warning disable
InputDevices.GetDevicesWithRole(s_DeviceRoles[5], s_InputDevicesRole);
#pragma warning enable
//InputDevices.GetDevicesWithCharacteristics(s_Characteristics[5], s_InputDevicesRole);
m_Text.text += "Role " + s_DeviceRoles[5] + " (" + s_InputDevicesRole.Count + "):\n";
for (int i = 0; i < s_InputDevicesRole.Count; i++)
{
m_Text.text += "\n" + i + "." + s_InputDevicesRole[i].name;
m_Text.text += "\n characteristics: " + s_InputDevicesRole[i].characteristics;
m_Text.text += "\n serialNumber: " + s_InputDevicesRole[i].serialNumber;
m_Text.text += "\n";
}
m_Text.text += "\n";
}
return;
}
InputDevices.GetDevices(s_InputDevices);
m_Text.text = "Input Devices (" + s_InputDevices.Count + "):\n";
for (int i = StartIndex; i < s_InputDevices.Count && i <= EndIndex; i++)
{
m_Text.text += "\n" + i + "." + s_InputDevices[i].name;
m_Text.text += "\n characteristics: " + s_InputDevices[i].characteristics;
m_Text.text += "\n serialNumber: " + s_InputDevices[i].serialNumber;
m_Text.text += "\n";
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 871111764a2c66043bf49bde40b9bb1f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -29,8 +29,8 @@ namespace VIVE.OpenXR.Samples.OpenXRInput
}
[SerializeField]
private int m_Index = 0;
public int Index { get { return m_Index; } set { m_Index = value; } }
private string m_TrackerName = "";
public string TrackerName { get { return m_TrackerName; } set { m_TrackerName = value; } }
[SerializeField]
private InputActionReference m_IsTracked = null;
@@ -58,7 +58,7 @@ namespace VIVE.OpenXR.Samples.OpenXRInput
{
if (m_Text == null) { return; }
m_Text.text = "Tracker" + m_Index;
m_Text.text = m_TrackerName;
m_Text.text += " isTracked: ";
{

View File

@@ -34,7 +34,24 @@ namespace VIVE.OpenXR.CompositionLayer.Samples.Passthrough
private void Update()
{
if (passthroughMesh != null && passthroughMeshTransform != null)
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.B)) //Set Passthrough as Overlay
{
SetPassthroughToOverlay();
}
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.A)) //Set Passthrough as Underlay
{
SetPassthroughToUnderlay();
}
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.X)) //Switch to world lock
{
SetWorldLock();
}
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.Y)) //Switch to head lock
{
SetHeadLock();
}
if (passthroughMesh != null && passthroughMeshTransform != null)
{
if (activePassthroughID == 0)
{
@@ -45,23 +62,6 @@ namespace VIVE.OpenXR.CompositionLayer.Samples.Passthrough
SetPassthroughMesh();
}
}
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.B)) //Set Passthrough as Overlay
{
SetPassthroughToOverlay();
}
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.A)) //Set Passthrough as Underlay
{
SetPassthroughToUnderlay();
}
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.X)) //Switch to world lock
{
SetWorldLock();
}
if (VRSInputManager.instance.GetButtonDown(VRSButtonReference.Y)) //Switch to head lock
{
SetHeadLock();
}
}
public void SetPassthroughToOverlay()

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6dd2b37427619d249ae9aeaa746c2f6f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 80e642904ff57634e9191ad924cdbc48
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ba676113e4d2dfc4095675f6fb934d9e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a343ad8228ed4924eab4fc954f5620bc
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9000000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d453ebaff8bdac64baaad756b9b24d9f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9000000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c5f5e4b11c3eb7849b74217c3351ca23
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9000000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4e5bee8db40a5a941a38710195e3219e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca57a546da07d9146aa710d82ec06e64
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a7f896cc07ac6a34a8789d0e7d4ed42f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9c4ca191297f69c46a9c041390be6f08
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ffc5d9eb6949adf4dacde705ecd5660c
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: f66ead3390398f443aa127b741826ad9, type: 3}
MigrateToVrm1: 1
RenderPipeline: 0

View File

@@ -0,0 +1,93 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Female1_Hair1
m_Shader: {fileID: 4800000, guid: e0edbf68d81d1f340ae8b110086b7063, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _MTOON_EMISSIVEMAP _MTOON_RIMMAP _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 630021176738988104, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 1899353872833492360, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2016903317187815046, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MatcapTex:
m_Texture: {fileID: 3414263392403339549, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineWidthTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _RimTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShadeTex:
m_Texture: {fileID: 2016903317187815046, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShadingShiftTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _UvAnimMaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaMode: 1
- _BumpScale: 1
- _Cutoff: 0.5
- _DoubleSided: 1
- _GiEqualization: 0.9
- _M_AlphaToMask: 1
- _M_CullMode: 0
- _M_DebugMode: 0
- _M_DstBlend: 0
- _M_EditMode: 1
- _M_SrcBlend: 1
- _M_ZWrite: 1
- _OutlineLightingMix: 1
- _OutlineWidth: 0
- _OutlineWidthMode: 0
- _RenderQueueOffset: 0
- _RimFresnelPower: 100
- _RimLift: 0.1
- _RimLightingMix: 1
- _ShadingShiftFactor: -0.41333333
- _ShadingShiftTexScale: 1
- _ShadingToonyFactor: 0.85333335
- _TransparentWithZWrite: 0
- _UvAnimRotationSpeed: 0
- _UvAnimScrollXSpeed: 0
- _UvAnimScrollYSpeed: 0
m_Colors:
- _Color: {r: 0.99990994, g: 0.69411767, b: 0.95686275, a: 1}
- _EmissionColor: {r: 0.85882354, g: 0.5411765, b: 0.23137255, a: 1}
- _MatcapColor: {r: 1, g: 1, b: 1, a: 1}
- _OutlineColor: {r: 0.2745097, g: 0.090195976, b: 0.12549007, a: 1}
- _RimColor: {r: 0.24999997, g: 0.24999997, b: 0.24999997, a: 1}
- _ShadeColor: {r: 1, g: 0.6933962, b: 0.9550255, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8731be491fbbaf5468e698d6ce56d37f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,93 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Female1_Hair2
m_Shader: {fileID: 4800000, guid: e0edbf68d81d1f340ae8b110086b7063, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _MTOON_EMISSIVEMAP _MTOON_RIMMAP _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 630021176738988104, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 1899353872833492360, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2016903317187815046, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MatcapTex:
m_Texture: {fileID: 3414263392403339549, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineWidthTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _RimTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShadeTex:
m_Texture: {fileID: 2016903317187815046, guid: ffc5d9eb6949adf4dacde705ecd5660c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShadingShiftTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _UvAnimMaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaMode: 1
- _BumpScale: 1
- _Cutoff: 0.5
- _DoubleSided: 1
- _GiEqualization: 0.9
- _M_AlphaToMask: 1
- _M_CullMode: 0
- _M_DebugMode: 0
- _M_DstBlend: 0
- _M_EditMode: 1
- _M_SrcBlend: 1
- _M_ZWrite: 1
- _OutlineLightingMix: 1
- _OutlineWidth: 0
- _OutlineWidthMode: 0
- _RenderQueueOffset: 0
- _RimFresnelPower: 100
- _RimLift: 0.1
- _RimLightingMix: 1
- _ShadingShiftFactor: -0.41333333
- _ShadingShiftTexScale: 1
- _ShadingToonyFactor: 0.85333335
- _TransparentWithZWrite: 0
- _UvAnimRotationSpeed: 0
- _UvAnimScrollXSpeed: 0
- _UvAnimScrollYSpeed: 0
m_Colors:
- _Color: {r: 0.39215687, g: 1, b: 0.39215687, a: 1}
- _EmissionColor: {r: 0.85882354, g: 0.5411765, b: 0.23137255, a: 1}
- _MatcapColor: {r: 1, g: 1, b: 1, a: 1}
- _OutlineColor: {r: 0.2745097, g: 0.090195976, b: 0.12549007, a: 1}
- _RimColor: {r: 0.24999997, g: 0.24999997, b: 0.24999997, a: 1}
- _ShadeColor: {r: 0.39215687, g: 1, b: 0.39215687, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2da33923e42511f4180d426efa7c2915
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9b12a4f157ad39b47980de0809e2d672
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8f58f5cce7b276d42b4e2da02a5af111
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blue
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 0, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1b386f8c7ca45f847828c4cf2c9703fa
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,101 @@
fileFormatVersion: 2
guid: d251a1fe92b535749b8342a88ec0c247
ModelImporter:
serializedVersion: 20101
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 3
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 0
importLights: 0
fileIdsGeneration: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Green
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 1, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a2a31e899e72926409960396e796f459
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,92 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Metal_M
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- PixelSnap: 0
- _BumpScale: 1
- _Cutoff: 0.264
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnableExternalAlpha: 0
- _GlossMapScale: 1
- _Glossiness: 0.504
- _GlossyReflections: 1
- _Metallic: 0.58
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Shininess: 0.049
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.49056602, g: 0.49056602, b: 0.49056602, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c0eddc6f76ea4484b949a7a798f78c38
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Red
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8f5425e46c95eca42ab7792ff091cdec
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Wood_M
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 0.8}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 7d5e3ad529809c34c929ddb79cd83d12, type: 3}
m_Scale: {x: 1, y: 0.8}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ad898bf3866892e46a7dfe774004a22d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,75 @@
fileFormatVersion: 2
guid: 7d5e3ad529809c34c929ddb79cd83d12
timeCreated: 18446744011573954816
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2bf9c62f5d084144ea10c5158e6263b6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,181 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6568267687227841555
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6568267687227841554}
- component: {fileID: 6568267687227841559}
- component: {fileID: 6568267687227841556}
- component: {fileID: 6568267687227841557}
m_Layer: 5
m_Name: JointCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6568267687227841554
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6568267687227841555}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
m_Children:
- {fileID: 6568267687423849798}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0.049987793, y: 0.019989014}
m_SizeDelta: {x: 662, y: 423}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &6568267687227841559
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6568267687227841555}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &6568267687227841556
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6568267687227841555}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 3
m_PresetInfoIsWorld: 1
--- !u!114 &6568267687227841557
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6568267687227841555}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &6568267687423849799
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6568267687423849798}
- component: {fileID: 6568267687423849848}
- component: {fileID: 6568267687423849849}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6568267687423849798
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6568267687423849799}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_Children: []
m_Father: {fileID: 6568267687227841554}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6568267687423849848
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6568267687423849799}
m_CullTransparentMesh: 0
--- !u!114 &6568267687423849849
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6568267687423849799}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Hip

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f87761f90ce16e64080721fdc84d976a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,712 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &722991505207640120
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991505207640121}
- component: {fileID: 722991505207640123}
- component: {fileID: 722991505207640122}
m_Layer: 0
m_Name: Y-Positive
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991505207640121
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991505207640120}
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.11, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 722991505333025910}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!33 &722991505207640123
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991505207640120}
m_Mesh: {fileID: 3613567641014311022, guid: 815c9e4802ddea645a37bd99f011c9b4, type: 3}
--- !u!23 &722991505207640122
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991505207640120}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a2a31e899e72926409960396e796f459, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &722991505333025909
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991505333025910}
m_Layer: 0
m_Name: Coordinates
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991505333025910
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991505333025909}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 722991507176713048}
- {fileID: 722991506712771225}
- {fileID: 722991506012398884}
- {fileID: 722991506918371342}
- {fileID: 722991505348189089}
- {fileID: 722991505207640121}
- {fileID: 722991506887611940}
m_Father: {fileID: 722991506193822121}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &722991505348189088
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991505348189089}
- component: {fileID: 722991505348189091}
- component: {fileID: 722991505348189090}
m_Layer: 0
m_Name: X-Positive
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991505348189089
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991505348189088}
m_LocalRotation: {x: -0.5, y: 0.5, z: -0.5, w: 0.5}
m_LocalPosition: {x: 0.11, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 722991505333025910}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 90, z: -90}
--- !u!33 &722991505348189091
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991505348189088}
m_Mesh: {fileID: 3613567641014311022, guid: 815c9e4802ddea645a37bd99f011c9b4, type: 3}
--- !u!23 &722991505348189090
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991505348189088}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 8f5425e46c95eca42ab7792ff091cdec, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &722991506012398891
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991506012398884}
- component: {fileID: 722991506012398887}
- component: {fileID: 722991506012398886}
- component: {fileID: 722991506012398885}
m_Layer: 0
m_Name: YAxis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991506012398884
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506012398891}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.005, y: 0.1, z: 0.005}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 722991505333025910}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &722991506012398887
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506012398891}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &722991506012398886
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506012398891}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a2a31e899e72926409960396e796f459, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &722991506012398885
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506012398891}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!1 &722991506193822120
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991506193822121}
m_Layer: 0
m_Name: JointCoordinate
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991506193822121
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506193822120}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 722991505333025910}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &722991506712771224
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991506712771225}
- component: {fileID: 722991506712771220}
- component: {fileID: 722991506712771227}
- component: {fileID: 722991506712771226}
m_Layer: 0
m_Name: XAxis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991506712771225
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506712771224}
m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.0049999994, y: 0.10000001, z: 0.005}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 722991505333025910}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
--- !u!33 &722991506712771220
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506712771224}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &722991506712771227
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506712771224}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 8f5425e46c95eca42ab7792ff091cdec, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &722991506712771226
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506712771224}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!1 &722991506887611947
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991506887611940}
- component: {fileID: 722991506887611942}
- component: {fileID: 722991506887611941}
m_Layer: 0
m_Name: Z-Positive
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991506887611940
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506887611947}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.11}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 722991505333025910}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &722991506887611942
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506887611947}
m_Mesh: {fileID: 3613567641014311022, guid: 815c9e4802ddea645a37bd99f011c9b4, type: 3}
--- !u!23 &722991506887611941
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506887611947}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 1b386f8c7ca45f847828c4cf2c9703fa, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &722991506918371341
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991506918371342}
- component: {fileID: 722991506918371337}
- component: {fileID: 722991506918371336}
- component: {fileID: 722991506918371343}
m_Layer: 0
m_Name: ZAxis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991506918371342
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506918371341}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.005, y: 0.10000001, z: 0.0049999994}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 722991505333025910}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &722991506918371337
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506918371341}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &722991506918371336
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506918371341}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 1b386f8c7ca45f847828c4cf2c9703fa, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &722991506918371343
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991506918371341}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!1 &722991507176713055
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722991507176713048}
- component: {fileID: 722991507176713051}
- component: {fileID: 722991507176713050}
- component: {fileID: 722991507176713049}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722991507176713048
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991507176713055}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.02, y: 0.02, z: 0.02}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 722991505333025910}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &722991507176713051
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991507176713055}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &722991507176713050
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991507176713055}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &722991507176713049
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722991507176713055}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5f7ce1ec61d59aa46bd41682ad51be57
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0b6de3c9535189741adb851dc7d6f8de
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,60 @@
// Copyright HTC Corporation All Rights Reserved.
using UnityEngine;
using UnityEngine.UI;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class AvatarIKMenu : MonoBehaviour
{
public AvatarIKSample ikScript = null;
public Text canvasTitle = null;
public Button beginBtn = null;
private void Update()
{
if (ikScript != null && canvasTitle != null)
{
string autoUpdateText = ikScript.autoUpdate ? "Automatically Tracking" : "Manually Tracking";
canvasTitle.text = ikScript.TrackingMode.Name() + "\n" + autoUpdateText;
}
}
public void SetArmMode()
{
if (ikScript != null)
ikScript.SetArmMode();
}
public void SetUpperMode()
{
if (ikScript != null)
ikScript.SetUpperMode();
}
public void SetFullMode()
{
if (ikScript != null)
ikScript.SetFullMode();
}
public void SetUpperBodyAndLegMode()
{
if (ikScript != null)
ikScript.SetUpperBodyAndLegMode();
}
public void BeginTracking()
{
if (ikScript != null)
{
if (beginBtn != null) { beginBtn.interactable = false; }
ikScript.BeginTracking();
}
}
public void StopTracking()
{
if (ikScript != null)
{
if (beginBtn != null) { beginBtn.interactable = true; }
ikScript.StopTracking();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 484659e19359fb740ac4a253c3fa83c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,238 @@
// Copyright HTC Corporation All Rights Reserved.
using System.Collections;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class AvatarIKSample : MonoBehaviour
{
#region Log
const string LOG_TAG = "VIVE.OpenXR.Toolkits.BodyTracking.Demo.AvatarIKSample";
private StringBuilder m_sb = null;
private StringBuilder sb {
get {
if (m_sb == null) { m_sb = new StringBuilder(); }
return m_sb;
}
}
void DEBUG(StringBuilder msg) { Debug.Log(LOG_TAG + " " + msg); }
int logFrame = -1;
bool printIntervalLog = false;
#endregion
#region Inspector
public Body inputBody;
private Body m_InitialBody = null;
private Vector3 m_InitialScale = Vector3.one;
public TrackerExtrinsic ext;
public bool autoUpdate = true;
#endregion
private BTDemoHelper.TrackingMode m_TrackingMode = BTDemoHelper.TrackingMode.FullBody;
public BTDemoHelper.TrackingMode TrackingMode { get { return m_TrackingMode; } }
public void SetArmMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.Arm;
sb.Clear().Append("SetArmMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
public void SetUpperMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.UpperBody;
sb.Clear().Append("SetUpperMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
public void SetFullMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.FullBody;
sb.Clear().Append("SetFullMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
public void SetUpperBodyAndLegMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.UpperBodyAndLeg;
sb.Clear().Append("SetUpperBodyAndLegMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
private void Awake()
{
if (m_InitialBody == null) { m_InitialBody = new Body(); }
sb.Clear().Append("Awake() Records the initial standard pose and body scale."); DEBUG(sb);
m_InitialBody.UpdateData(inputBody);
m_InitialScale = transform.localScale;
}
private void Update()
{
logFrame++;
logFrame %= 300;
printIntervalLog = (logFrame == 0);
}
private void OnDisable()
{
StopTracking();
}
bool updateTrackingData = false;
public void BeginTracking()
{
sb.Clear().Append("BeginTracking() autoUpdate: ").Append(autoUpdate).Append(", tracking mode: ").Append(m_TrackingMode); DEBUG(sb);
updateTrackingData = true;
if (autoUpdate)
StartCoroutine(StartRenderUpdateBodyTracking());
else
StartCoroutine(StartFixUpdateBodyTracking());
}
public void StopTracking()
{
updateTrackingData = false;
sb.Clear().Append("StopTracking() Recovers the initial standard pose and body scale."); DEBUG(sb);
if (inputBody != null && m_InitialBody != null) { m_InitialBody.UpdateBody(ref inputBody); }
transform.localScale = m_InitialScale;
}
private Vector3 ApplyBodyScale(float scale)
{
sb.Clear().Append("ApplyBodyScale() ")
.Append(" old scale (").Append(transform.localScale.x).Append(", ").Append(transform.localScale.y).Append(", ").Append(transform.localScale.z).Append(")")
.Append(", apply scale ").Append(scale);
DEBUG(sb);
transform.localScale *= scale;
sb.Clear().Append("ApplyBodyScale() ")
.Append(" new scale (").Append(transform.localScale.x).Append(", ").Append(transform.localScale.y).Append(", ").Append(transform.localScale.z).Append(")");
DEBUG(sb);
return transform.localScale;
}
private int m_AvatarID = -1;
public IEnumerator StartRenderUpdateBodyTracking()
{
if (BodyManager.Instance == null) { yield return null; }
sb.Clear().Append("StartRenderUpdateBodyTracking()"); DEBUG(sb);
yield return new WaitForSeconds(3f);
BodyTrackingResult result = BodyManager.Instance.SetStandardPose((BodyTrackingMode)m_TrackingMode);
sb.Clear().Append("StartRenderUpdateBodyTracking() SetStandardPose result ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
result = BodyManager.Instance.CreateBodyTracking(ref m_AvatarID, inputBody, ext, (BodyTrackingMode)m_TrackingMode);
sb.Clear().Append("StartRenderUpdateBodyTracking() CreateBodyTracking result ").Append(result.Name()).Append(", id: ").Append(m_AvatarID); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
result = BodyManager.Instance.GetBodyTrackingInfo(m_AvatarID, out float avatarHeight, out float avatarScale);
sb.Clear().Append("StartRenderUpdateBodyTracking() GetBodyTrackingInfo result ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
// Due to the pose from GetBodyTrackingPoseOnce is "scaled pose", we need to change the avatar mesh size first.
sb.Clear().Append("StartRenderUpdateBodyTracking() Apply avatar scale with ").Append(avatarScale); DEBUG(sb);
ApplyBodyScale(avatarScale);
result = BodyManager.Instance.StartUpdatingBodyTracking(m_AvatarID);
sb.Clear().Append("StartRenderUpdateBodyTracking() StartUpdatingBodyTracking ").Append(m_AvatarID).Append(" result ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
while (updateTrackingData)
{
result = BodyManager.Instance.GetBodyTrackingPoses(m_AvatarID, out BodyAvatar avatarBody);
if (result == BodyTrackingResult.SUCCESS) { UpdateBodyPosesInOrder(avatarBody); }
yield return new WaitForEndOfFrame();
}
result = BodyManager.Instance.StopUpdatingBodyTracking(m_AvatarID);
sb.Clear().Append("StartRenderUpdateBodyTracking() StopUpdatingBodyTracking ").Append(m_AvatarID).Append(" result ").Append(result.Name()); DEBUG(sb);
result = BodyManager.Instance.DestroyBodyTracking(m_AvatarID);
sb.Clear().Append("StartRenderUpdateBodyTracking() DestroyBodyTracking result ").Append(result.Name()).Append(", id: ").Append(m_AvatarID); DEBUG(sb);
yield return null;
}
public IEnumerator StartFixUpdateBodyTracking()
{
if (BodyManager.Instance == null) { yield return null; }
sb.Clear().Append("StartFixUpdateBodyTracking()"); DEBUG(sb);
yield return new WaitForSeconds(3f);
BodyTrackingResult result = BodyManager.Instance.SetStandardPose((BodyTrackingMode)m_TrackingMode);
sb.Clear().Append("StartFixUpdateBodyTracking() SetStandardPose result ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
result = BodyManager.Instance.CreateBodyTracking(ref m_AvatarID, inputBody, ext, (BodyTrackingMode)m_TrackingMode);
sb.Clear().Append("StartFixUpdateBodyTracking() CreateBodyTracking result ").Append(result.Name()).Append(", id: ").Append(m_AvatarID); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
result = BodyManager.Instance.GetBodyTrackingInfo(m_AvatarID, out float avatarHeight, out float avatarScale);
sb.Clear().Append("StartFixUpdateBodyTracking() GetBodyTrackingInfo result ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
// Due to the pose from GetBodyTrackingPoseOnce is "scaled pose", we need to change the avatar mesh size first.
sb.Clear().Append("StartFixUpdateBodyTracking() Apply avatar scale with ").Append(avatarScale); DEBUG(sb);
ApplyBodyScale(avatarScale);
while (updateTrackingData)
{
result = BodyManager.Instance.GetBodyTrackingPoseOnce(m_AvatarID, out BodyAvatar avatarBody);
if (result == BodyTrackingResult.SUCCESS) { UpdateBodyPosesInOrder(avatarBody); }
yield return new WaitForEndOfFrame();
}
result = BodyManager.Instance.DestroyBodyTracking(m_AvatarID);
sb.Clear().Append("StartFixUpdateBodyTracking() DestroyBodyTracking result ").Append(result.Name()).Append(", id: ").Append(m_AvatarID); DEBUG(sb);
yield return null;
}
/// <summary>
/// Update the body joints poses according to the avatar joint order.
/// If your avatar joint order is different, you have to modify this function.
/// </summary>
/// <param name="avatarBody">The avatar IK pose from plugin.</param>
private void UpdateBodyPosesInOrder(BodyAvatar avatarBody)
{
if (inputBody == null || avatarBody == null) { return; }
if (printIntervalLog)
{
sb.Clear().Append("UpdateBodyPosesInOrder() new avatar height ").Append(avatarBody.height)
.Append(", original avatar height ").Append(m_InitialBody.height)
.Append(", scale: ").Append(avatarBody.scale);
DEBUG(sb);
}
if (inputBody.root != null) avatarBody.Update(JointType.HIP, ref inputBody.root);
if (inputBody.leftThigh != null) avatarBody.Update(JointType.LEFTTHIGH, ref inputBody.leftThigh);
if (inputBody.leftLeg != null) avatarBody.Update(JointType.LEFTLEG, ref inputBody.leftLeg);
if (inputBody.leftAnkle != null) avatarBody.Update(JointType.LEFTANKLE, ref inputBody.leftAnkle);
if (inputBody.leftFoot != null) avatarBody.Update(JointType.LEFTFOOT, ref inputBody.leftFoot);
if (inputBody.rightThigh != null) avatarBody.Update(JointType.RIGHTTHIGH, ref inputBody.rightThigh); // 5
if (inputBody.rightLeg != null) avatarBody.Update(JointType.RIGHTLEG, ref inputBody.rightLeg);
if (inputBody.rightAnkle != null) avatarBody.Update(JointType.RIGHTANKLE, ref inputBody.rightAnkle);
if (inputBody.rightFoot != null) avatarBody.Update(JointType.RIGHTFOOT, ref inputBody.rightFoot);
if (inputBody.waist != null) avatarBody.Update(JointType.WAIST, ref inputBody.waist);
if (inputBody.spineLower != null) avatarBody.Update(JointType.SPINELOWER, ref inputBody.spineLower); // 10
if (inputBody.spineMiddle != null) avatarBody.Update(JointType.SPINEMIDDLE, ref inputBody.spineMiddle);
if (inputBody.spineHigh != null) avatarBody.Update(JointType.SPINEHIGH, ref inputBody.spineHigh);
if (inputBody.chest != null) avatarBody.Update(JointType.CHEST, ref inputBody.chest);
if (inputBody.neck != null) avatarBody.Update(JointType.NECK, ref inputBody.neck);
if (inputBody.head != null) avatarBody.Update(JointType.HEAD, ref inputBody.head); // 15
if (inputBody.leftClavicle != null) avatarBody.Update(JointType.LEFTCLAVICLE, ref inputBody.leftClavicle);
if (inputBody.leftScapula != null) avatarBody.Update(JointType.LEFTSCAPULA, ref inputBody.leftScapula);
if (inputBody.leftUpperarm != null) avatarBody.Update(JointType.LEFTUPPERARM, ref inputBody.leftUpperarm);
if (inputBody.leftForearm != null) avatarBody.Update(JointType.LEFTFOREARM, ref inputBody.leftForearm);
if (inputBody.leftHand != null) avatarBody.Update(JointType.LEFTHAND, ref inputBody.leftHand); // 20
if (inputBody.rightClavicle != null) avatarBody.Update(JointType.RIGHTCLAVICLE, ref inputBody.rightClavicle);
if (inputBody.rightScapula != null) avatarBody.Update(JointType.RIGHTSCAPULA, ref inputBody.rightScapula);
if (inputBody.rightUpperarm != null) avatarBody.Update(JointType.RIGHTUPPERARM, ref inputBody.rightUpperarm);
if (inputBody.rightForearm != null) avatarBody.Update(JointType.RIGHTFOREARM, ref inputBody.rightForearm);
if (inputBody.rightHand != null) avatarBody.Update(JointType.RIGHTHAND, ref inputBody.rightHand); // 25
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6acba111d20a438439e5d1152010efa5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,27 @@
// Copyright HTC Corporation All Rights Reserved.
using System;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public static class BTDemoHelper
{
public enum TrackingMode : UInt32
{
Arm = BodyTrackingMode.ARMIK,
UpperBody = BodyTrackingMode.UPPERBODYIK,
FullBody = BodyTrackingMode.FULLBODYIK,
UpperBodyAndLeg = BodyTrackingMode.UPPERIKANDLEGFK,
}
public static string Name(this TrackingMode mode)
{
if (mode == TrackingMode.Arm) { return "Arm"; }
if (mode == TrackingMode.FullBody) { return "FullBody"; }
if (mode == TrackingMode.UpperBody) { return "UpperBody"; }
if (mode == TrackingMode.UpperBodyAndLeg) { return "UpperLeg"; }
return "";
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6003986a7c6675149ad6dcbfa900d2ab
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,60 @@
// Copyright HTC Corporation All Rights Reserved.
using UnityEngine;
using UnityEngine.UI;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class BodyTrackingMenu : MonoBehaviour
{
public BodyTrackingSample ikScript = null;
public Text canvasTitle = null;
public Button beginBtn = null;
private void Update()
{
if (ikScript != null && canvasTitle != null)
{
string autoUpdateText = "Manually Tracking";
canvasTitle.text = ikScript.TrackingMode.Name() + "\n" + autoUpdateText;
}
}
public void SetArmMode()
{
if (ikScript != null)
ikScript.SetArmMode();
}
public void SetUpperMode()
{
if (ikScript != null)
ikScript.SetUpperMode();
}
public void SetFullMode()
{
if (ikScript != null)
ikScript.SetFullMode();
}
public void SetUpperBodyAndLegMode()
{
if (ikScript != null)
ikScript.SetUpperBodyAndLegMode();
}
public void BeginTracking()
{
if (ikScript != null)
{
if (beginBtn != null) { beginBtn.interactable = false; }
ikScript.BeginTracking();
}
}
public void StopTracking()
{
if (ikScript != null)
{
if (beginBtn != null) { beginBtn.interactable = true; }
ikScript.StopTracking();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1ce84a5b6c4092e40a1155eeb200021c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,361 @@
// Copyright HTC Corporation All Rights Reserved.
using System;
using System.Collections;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class BodyTrackingSample : MonoBehaviour
{
#region Log
const string LOG_TAG = "VIVE.OpenXR.Toolkits.BodyTracking.Demo.BodyTrackingSample";
private StringBuilder m_sb = null;
private StringBuilder sb
{
get
{
if (m_sb == null) { m_sb = new StringBuilder(); }
return m_sb;
}
}
void DEBUG(StringBuilder msg) { Debug.Log(LOG_TAG + " " + msg); }
int logFrame = -1;
bool printIntervalLog = false;
void ERROR(StringBuilder msg) { Debug.LogError(LOG_TAG + msg); }
#endregion
#region Inspector
public Body inputBody;
private Body m_InitialBody = null;
private Vector3 m_InitialScale = Vector3.one;
#endregion
private BTDemoHelper.TrackingMode m_TrackingMode = BTDemoHelper.TrackingMode.FullBody;
public BTDemoHelper.TrackingMode TrackingMode { get { return m_TrackingMode; } }
public void SetArmMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.Arm;
sb.Clear().Append("SetArmMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
public void SetUpperMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.UpperBody;
sb.Clear().Append("SetUpperMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
public void SetFullMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.FullBody;
sb.Clear().Append("SetFullMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
public void SetUpperBodyAndLegMode()
{
m_TrackingMode = BTDemoHelper.TrackingMode.UpperBodyAndLeg;
sb.Clear().Append("SetUpperBodyAndLegMode() m_TrackingMode: ").Append(m_TrackingMode.Name()); DEBUG(sb);
}
private void Awake()
{
if (m_InitialBody == null) { m_InitialBody = new Body(); }
sb.Clear().Append("Awake() Records the initial standard pose and body scale."); DEBUG(sb);
m_InitialBody.UpdateData(inputBody);
m_InitialScale = transform.localScale;
}
private void Update()
{
logFrame++;
logFrame %= 300;
printIntervalLog = (logFrame == 0);
}
private void OnDisable()
{
StopTracking();
}
bool updateTrackingData = false;
public void BeginTracking()
{
if (BodyManager.Instance == null) { return; }
sb.Clear().Append("BeginTracking() ").Append(m_TrackingMode.Name()); DEBUG(sb);
updateTrackingData = true;
StartCoroutine(StartBodyTracking());
}
public void StopTracking()
{
updateTrackingData = false;
sb.Clear().Append("StopTracking() Recovers the body scale."); DEBUG(sb);
transform.localScale = m_InitialScale;
}
private Vector3 ApplyBodyScale(float scale)
{
sb.Clear().Append("ApplyBodyScale() ")
.Append(" old scale (").Append(transform.localScale.x).Append(", ").Append(transform.localScale.y).Append(", ").Append(transform.localScale.z).Append(")")
.Append(", apply scale ").Append(scale);
DEBUG(sb);
transform.localScale *= scale;
sb.Clear().Append("ApplyBodyScale() ")
.Append(" new scale (").Append(transform.localScale.x).Append(", ").Append(transform.localScale.y).Append(", ").Append(transform.localScale.z).Append(")");
DEBUG(sb);
return transform.localScale;
}
private int m_TrackerId = -1;
private IEnumerator StartBodyTracking()
{
if (BodyManager.Instance == null) { yield return null; }
yield return new WaitForSeconds(3f);
sb.Clear(); sb.Append("StartBodyTracking() ").Append(m_TrackingMode.Name()); DEBUG(sb);
// Sets the standard pose for calibration.
var result = BodyManager.Instance.SetStandardPose((BodyTrackingMode)m_TrackingMode);
sb.Clear(); sb.Append("StartBodyTracking() SetStandardPose result: ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
// Creates a body tracker.
result = BodyManager.Instance.CreateBodyTracking(ref m_TrackerId, (BodyTrackingMode)m_TrackingMode);
sb.Clear(); sb.Append("StartBodyTracking() CreateBodyTracking(").Append(m_TrackerId).Append(") result: ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
// Retrieves the default rotation spaces.
result = BodyManager.Instance.GetDefaultRotationSpace(m_TrackerId, out RotateSpace[] rotationSpaces, out UInt32 rotationSpaceCount);
sb.Clear(); sb.Append("StartBodyTracking() GetBodyRotationSpaces result: ").Append(result.Name()).Append(", jointCount: ").Append(rotationSpaceCount);
DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS || rotationSpaceCount == 0) { yield break; }
for (UInt32 i = 0; i < rotationSpaceCount; i++)
{
sb.Clear();
sb.Append("StartBodyTracking() rotationSpaces[").Append(i).Append("]")
.Append(", rotation(").Append(rotationSpaces[i].rotation.x)
.Append(", ").Append(rotationSpaces[i].rotation.y)
.Append(", ").Append(rotationSpaces[i].rotation.z)
.Append(", ").Append(rotationSpaces[i].rotation.w).Append(")");
DEBUG(sb);
}
result = BodyManager.Instance.GetBodyTrackingInfo(m_TrackerId, out float avatarHeight, out float avatarScale);
sb.Clear().Append("StartBodyTracking() GetBodyTrackingInfo result ").Append(result.Name()).Append(", avatarHeight ").Append(avatarHeight).Append(", avatarScale ").Append(avatarScale); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
// Due to the pose from GetBodyTrackingPoseOnce is "scaled pose", we need to change the avatar mesh size first.
// The avatarBody.height is user's height in calibration.
// The m_InitialBody.height is the height of avatar used in this content.
// Due to the avatarScale in Body Tracking is always 1, so we calculate the scale with (user height / avatar height).
float scale = avatarHeight / m_InitialBody.height;
sb.Clear().Append("StartBodyTracking() Apply avatar scale with ").Append(scale); DEBUG(sb);
ApplyBodyScale(scale);
while (updateTrackingData)
{
result = BodyManager.Instance.GetBodyTrackingPoseOnce(m_TrackerId, out BodyAvatar avatarBody);
if (result == BodyTrackingResult.SUCCESS) { UpdateBodyPosesInOrder(avatarBody, rotationSpaces, rotationSpaceCount); }
yield return new WaitForEndOfFrame();
}
result = BodyManager.Instance.DestroyBodyTracking(m_TrackerId);
sb.Clear(); sb.Append("StartBodyTracking() DestroyBodyTracking(").Append(m_TrackerId).Append(") result: ").Append(result.Name()); DEBUG(sb);
yield return null;
}
/// <summary>
/// Update the body joints poses according to the avatar joint order.
/// If your avatar joint order is different, you have to modify this function.
/// </summary>
/// <param name="avatarBody">The avatar IK pose from plugin.</param>
private void UpdateBodyPosesInOrder(BodyAvatar avatarBody, RotateSpace[] rotationSpaces, UInt32 rotationSpaceCount)
{
if (inputBody == null || m_InitialBody == null || avatarBody == null || rotationSpaces == null) { return; }
if (printIntervalLog)
{
sb.Clear().Append("UpdateBodyPosesInOrder() new avatar height ").Append(avatarBody.height)
.Append(", original avatar height ").Append(m_InitialBody.height)
.Append(", scale: ").Append(avatarBody.scale);
DEBUG(sb);
}
if (inputBody.root != null)
{
avatarBody.Update(JointType.HIP, ref inputBody.root);
UpdateBodyTransform(JointType.HIP, rotationSpaces, rotationSpaceCount, m_InitialBody.HipData.rotation, ref inputBody.root);
}
if (inputBody.leftThigh != null)
{
inputBody.leftThigh.rotation = avatarBody.leftThigh.rotation;
UpdateBodyTransform(JointType.LEFTTHIGH, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftThighData.rotation, ref inputBody.leftThigh);
}
if (inputBody.leftLeg != null)
{
inputBody.leftLeg.rotation = avatarBody.leftLeg.rotation;
UpdateBodyTransform(JointType.LEFTLEG, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftLegData.rotation, ref inputBody.leftLeg);
}
if (inputBody.leftAnkle != null)
{
inputBody.leftAnkle.rotation = avatarBody.leftAnkle.rotation;
UpdateBodyTransform(JointType.LEFTANKLE, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftAnkleData.rotation, ref inputBody.leftAnkle);
}
if (inputBody.leftFoot != null)
{
inputBody.leftFoot.rotation = avatarBody.leftFoot.rotation;
UpdateBodyTransform(JointType.LEFTFOOT, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftFootData.rotation, ref inputBody.leftFoot);
}
if (inputBody.rightThigh != null)
{
inputBody.rightThigh.rotation = avatarBody.rightThigh.rotation;
UpdateBodyTransform(JointType.RIGHTTHIGH, rotationSpaces, rotationSpaceCount, m_InitialBody.RightThighData.rotation, ref inputBody.rightThigh);
}
if (inputBody.rightLeg != null)
{
inputBody.rightLeg.rotation = avatarBody.rightLeg.rotation;
UpdateBodyTransform(JointType.RIGHTLEG, rotationSpaces, rotationSpaceCount, m_InitialBody.RightLegData.rotation, ref inputBody.rightLeg);
}
if (inputBody.rightAnkle != null)
{
inputBody.rightAnkle.rotation = avatarBody.rightAnkle.rotation;
UpdateBodyTransform(JointType.RIGHTANKLE, rotationSpaces, rotationSpaceCount, m_InitialBody.RightAnkleData.rotation, ref inputBody.rightAnkle);
}
if (inputBody.rightFoot != null)
{
inputBody.rightFoot.rotation = avatarBody.rightFoot.rotation;
UpdateBodyTransform(JointType.RIGHTFOOT, rotationSpaces, rotationSpaceCount, m_InitialBody.RightFootData.rotation, ref inputBody.rightFoot);
}
if (inputBody.waist != null)
{
inputBody.waist.rotation = avatarBody.waist.rotation;
UpdateBodyTransform(JointType.WAIST, rotationSpaces, rotationSpaceCount, m_InitialBody.WaistData.rotation, ref inputBody.waist);
}
if (inputBody.spineLower != null)
{
inputBody.spineLower.rotation = avatarBody.spineLower.rotation;
UpdateBodyTransform(JointType.SPINELOWER, rotationSpaces, rotationSpaceCount, m_InitialBody.SpineLowerData.rotation, ref inputBody.spineLower);
}
if (inputBody.spineMiddle != null)
{
inputBody.spineMiddle.rotation = avatarBody.spineMiddle.rotation;
UpdateBodyTransform(JointType.SPINEMIDDLE, rotationSpaces, rotationSpaceCount, m_InitialBody.SpineMiddleData.rotation, ref inputBody.spineMiddle);
}
if (inputBody.spineHigh != null)
{
inputBody.spineHigh.rotation = avatarBody.spineHigh.rotation;
UpdateBodyTransform(JointType.SPINEHIGH, rotationSpaces, rotationSpaceCount, m_InitialBody.SpineHighData.rotation, ref inputBody.spineHigh);
}
if (inputBody.chest != null)
{
inputBody.chest.rotation = avatarBody.chest.rotation;
UpdateBodyTransform(JointType.CHEST, rotationSpaces, rotationSpaceCount, m_InitialBody.ChestData.rotation, ref inputBody.chest);
}
if (inputBody.neck != null)
{
inputBody.neck.rotation = avatarBody.neck.rotation;
UpdateBodyTransform(JointType.NECK, rotationSpaces, rotationSpaceCount, m_InitialBody.NeckData.rotation, ref inputBody.neck);
}
if (inputBody.head != null)
{
inputBody.head.rotation = avatarBody.head.rotation;
UpdateBodyTransform(JointType.HEAD, rotationSpaces, rotationSpaceCount, m_InitialBody.HeadData.rotation, ref inputBody.head);
}
if (inputBody.leftClavicle != null)
{
inputBody.leftClavicle.rotation = avatarBody.leftClavicle.rotation;
UpdateBodyTransform(JointType.LEFTCLAVICLE, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftClavicleData.rotation, ref inputBody.leftClavicle);
}
if (inputBody.leftScapula != null)
{
inputBody.leftScapula.rotation = avatarBody.leftScapula.rotation;
UpdateBodyTransform(JointType.LEFTSCAPULA, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftScapulaData.rotation, ref inputBody.leftScapula);
}
if (inputBody.leftUpperarm != null)
{
inputBody.leftUpperarm.rotation = avatarBody.leftUpperarm.rotation;
UpdateBodyTransform(JointType.LEFTUPPERARM, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftUpperarmData.rotation, ref inputBody.leftUpperarm);
}
if (inputBody.leftForearm != null)
{
inputBody.leftForearm.rotation = avatarBody.leftForearm.rotation;
UpdateBodyTransform(JointType.LEFTFOREARM, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftForearmData.rotation, ref inputBody.leftForearm);
}
if (inputBody.leftHand != null)
{
inputBody.leftHand.rotation = avatarBody.leftHand.rotation;
UpdateBodyTransform(JointType.LEFTHAND, rotationSpaces, rotationSpaceCount, m_InitialBody.LeftHandData.rotation, ref inputBody.leftHand);
}
if (inputBody.rightClavicle != null)
{
inputBody.rightClavicle.rotation = avatarBody.rightClavicle.rotation;
UpdateBodyTransform(JointType.RIGHTCLAVICLE, rotationSpaces, rotationSpaceCount, m_InitialBody.RightClavicleData.rotation, ref inputBody.rightClavicle);
}
if (inputBody.rightScapula != null)
{
inputBody.rightScapula.rotation = avatarBody.rightScapula.rotation;
UpdateBodyTransform(JointType.RIGHTSCAPULA, rotationSpaces, rotationSpaceCount, m_InitialBody.RightScapulaData.rotation, ref inputBody.rightScapula);
}
if (inputBody.rightUpperarm != null)
{
inputBody.rightUpperarm.rotation = avatarBody.rightUpperarm.rotation;
UpdateBodyTransform(JointType.RIGHTUPPERARM, rotationSpaces, rotationSpaceCount, m_InitialBody.RightUpperarmData.rotation, ref inputBody.rightUpperarm);
}
if (inputBody.rightForearm != null)
{
inputBody.rightForearm.rotation = avatarBody.rightForearm.rotation;
UpdateBodyTransform(JointType.RIGHTFOREARM, rotationSpaces, rotationSpaceCount, m_InitialBody.RightForearmData.rotation, ref inputBody.rightForearm);
}
if (inputBody.rightHand != null)
{
inputBody.rightHand.rotation = avatarBody.rightHand.rotation;
UpdateBodyTransform(JointType.RIGHTHAND, rotationSpaces, rotationSpaceCount, m_InitialBody.RightHandData.rotation, ref inputBody.rightHand);
}
}
private void UpdateBodyTransform(JointType type, RotateSpace[] rotationSpaces, UInt32 rotationSpaceCount, Quaternion customRot, ref Transform joint)
{
if (joint == null) { return; }
if (printIntervalLog)
{
sb.Clear().Append("UpdateJoint() ").Append(type.Name())
.Append(", rotTPose(").Append(customRot.x).Append(", ").Append(customRot.y).Append(", ").Append(customRot.z).Append(", ").Append(customRot.w).Append(")");
DEBUG(sb);
sb.Clear().Append(", rotation before (").Append(joint.rotation.x).Append(", ").Append(joint.rotation.y).Append(", ").Append(joint.rotation.z).Append(", ").Append(joint.rotation.w).Append(")");
DEBUG(sb);
}
// and apply the rotation space to body tracking avatar joint rotation.
UInt32 index = 0;
Quaternion diff = Quaternion.identity;
for (index = 0; index < rotationSpaceCount; index++)
{
if (rotationSpaces[index].jointType == type)
{
// Calculate the rotation diff from default rotation space to custom avatar standard rotation.
if (BodyTrackingUtils.GetQuaternionDiff(rotationSpaces[index].rotation, customRot, out diff))
{
// Apply the joint rotation with rotation diff.
joint.rotation *= diff;
}
break;
}
}
if (printIntervalLog)
{
sb.Clear().Append(", rotation diff (").Append(diff.x).Append(", ").Append(diff.y).Append(", ").Append(diff.z).Append(", ").Append(diff.w).Append(")");
DEBUG(sb);
sb.Clear().Append(", rotation after (").Append(joint.rotation.x).Append(", ").Append(joint.rotation.y).Append(", ").Append(joint.rotation.z).Append(", ").Append(joint.rotation.w).Append(")");
DEBUG(sb);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7fe78f368960e1f4fbe93482c3339994
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cd203c5ef266e6c4aa76ec55066b6b16
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,75 @@
// Copyright HTC Corporation All Rights Reserved.
using System.Text;
using UnityEngine;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class BodyJointCoordinate : MonoBehaviour
{
const string LOG_TAG = "VIVE.OpenXR.Toolkits.BodyTracking.Demo.BodyJointCoordinate";
private StringBuilder m_sb = null;
private StringBuilder sb {
get {
if (m_sb == null) { m_sb = new StringBuilder(); }
return m_sb;
}
}
void DEBUG(StringBuilder msg) { Debug.Log(LOG_TAG + " " + msg); }
int logFrame = 0;
bool printIntervalLog = false;
public Body inputBody;
private void Update()
{
logFrame++;
logFrame %= 300;
printIntervalLog = (logFrame == 0);
if (BodyManager.Instance.GetBodyTrackingPoses(0, out BodyAvatar avatarBody) == BodyTrackingResult.SUCCESS)
UpdateBodyPosesInOrder(avatarBody);
}
private void UpdateBodyPosesInOrder(BodyAvatar avatarBody)
{
if (inputBody == null || avatarBody == null) { return; }
inputBody.height = avatarBody.height;
if (inputBody.root != null) avatarBody.Update(JointType.HIP, ref inputBody.root); // 0
if (inputBody.leftThigh != null) avatarBody.Update(JointType.LEFTTHIGH, ref inputBody.leftThigh);
if (inputBody.leftLeg != null) avatarBody.Update(JointType.LEFTLEG, ref inputBody.leftLeg);
if (inputBody.leftAnkle != null) avatarBody.Update(JointType.LEFTANKLE, ref inputBody.leftAnkle);
if (inputBody.leftFoot != null) avatarBody.Update(JointType.LEFTFOOT, ref inputBody.leftFoot);
if (inputBody.rightThigh != null) avatarBody.Update(JointType.RIGHTTHIGH, ref inputBody.rightThigh); // 5
if (inputBody.rightLeg != null) avatarBody.Update(JointType.RIGHTLEG, ref inputBody.rightLeg);
if (inputBody.rightAnkle != null) avatarBody.Update(JointType.RIGHTANKLE, ref inputBody.rightAnkle);
if (inputBody.rightFoot != null) avatarBody.Update(JointType.RIGHTFOOT, ref inputBody.rightFoot);
if (inputBody.waist != null) avatarBody.Update(JointType.WAIST, ref inputBody.waist);
if (inputBody.spineLower != null) avatarBody.Update(JointType.SPINELOWER, ref inputBody.spineLower); // 10
if (inputBody.spineMiddle != null) avatarBody.Update(JointType.SPINEMIDDLE, ref inputBody.spineMiddle);
if (inputBody.spineHigh != null) avatarBody.Update(JointType.SPINEHIGH, ref inputBody.spineHigh);
if (inputBody.chest != null) avatarBody.Update(JointType.CHEST, ref inputBody.chest);
if (inputBody.neck != null) avatarBody.Update(JointType.NECK, ref inputBody.neck);
if (inputBody.head != null) avatarBody.Update(JointType.HEAD, ref inputBody.head); // 15
if (inputBody.leftClavicle != null) avatarBody.Update(JointType.LEFTCLAVICLE, ref inputBody.leftClavicle);
if (inputBody.leftScapula != null) avatarBody.Update(JointType.LEFTSCAPULA, ref inputBody.leftScapula);
if (inputBody.leftUpperarm != null) avatarBody.Update(JointType.LEFTUPPERARM, ref inputBody.leftUpperarm);
if (inputBody.leftForearm != null) avatarBody.Update(JointType.LEFTFOREARM, ref inputBody.leftForearm);
if (inputBody.leftHand != null) avatarBody.Update(JointType.LEFTHAND, ref inputBody.leftHand); // 20
if (inputBody.rightClavicle != null) avatarBody.Update(JointType.RIGHTCLAVICLE, ref inputBody.rightClavicle);
if (inputBody.rightScapula != null) avatarBody.Update(JointType.RIGHTSCAPULA, ref inputBody.rightScapula);
if (inputBody.rightUpperarm != null) avatarBody.Update(JointType.RIGHTUPPERARM, ref inputBody.rightUpperarm);
if (inputBody.rightForearm != null) avatarBody.Update(JointType.RIGHTFOREARM, ref inputBody.rightForearm);
if (inputBody.rightHand != null) avatarBody.Update(JointType.RIGHTHAND, ref inputBody.rightHand); // 25
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a612ab4e3223d2d4e806db814c6da6f6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
// Copyright HTC Corporation All Rights Reserved.
using UnityEngine;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class DebugRotation : MonoBehaviour
{
public Vector4 Rot;
public void Rotate()
{
transform.rotation = new Quaternion(Rot.x, Rot.y, Rot.z, Rot.w);
Debug.Log("VIVE.OpenXR.Toolkits.BodyTracking.Demo.DebugRotation " + gameObject.name
+ " rotation ("
+ transform.rotation.eulerAngles.x.ToString() + ", "
+ transform.rotation.eulerAngles.y.ToString() + ", "
+ transform.rotation.eulerAngles.z.ToString() + ")");
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fb9669fbc08615943b7b72e6918f69e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
// Copyright HTC Corporation All Rights Reserved.
using System.Collections.Generic;
using UnityEngine;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class DebugRotationMaster : MonoBehaviour
{
public List<DebugRotation> DRs;
void Start()
{
for (int i = 0; i < DRs.Count; i++)
{
DRs[i].Rotate();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 79f90073bb4970246b29d11db18fa4e5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,50 @@
// Copyright HTC Corporation All Rights Reserved.
using System.IO;
using System.Text;
using UnityEngine;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class ProfilerLogger : MonoBehaviour
{
const string LOG_TAG = "VIVE.OpenXR.Toolkits.BodyTracking.Demo.ProfilerLogger ";
private StringBuilder m_sb = null;
internal StringBuilder sb {
get {
if (m_sb == null) { m_sb = new StringBuilder(); }
return m_sb;
}
}
void DEBUG(StringBuilder sb)
{
sb.Insert(0, LOG_TAG);
Debug.Log(sb);
}
private string logFilePath;
private void Awake()
{
logFilePath = Path.Combine(Application.persistentDataPath, "profiler_log");
sb.Clear().Append("Profiler log file path: ").Append(logFilePath); DEBUG(sb);
UnityEngine.Profiling.Profiler.logFile = logFilePath;
UnityEngine.Profiling.Profiler.enableBinaryLog = true;
UnityEngine.Profiling.Profiler.enabled = true;
}
public void ExitGame()
{
UnityEngine.Profiling.Profiler.enableBinaryLog = false;
UnityEngine.Profiling.Profiler.enabled = false;
/*string rawFilePath = logFilePath + ".raw";
string destinationPath = "/sdcard/profiler_log.raw";
File.Move(rawFilePath, destinationPath);
sb.Clear().Append("Profiler log file saved to: ").Append(destinationPath); DEBUG(sb);*/
Application.Quit();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 596760f8b34e9b8499ed1f51143777f2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,70 @@
// Copyright HTC Corporation All Rights Reserved.
using System.Text;
using UnityEngine;
using UnityEngine.UI;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class HumanoidTrackingSample : MonoBehaviour
{
const string LOG_TAG = "VIVE.OpenXR.Toolkits.BodyTracking.Demo.HumanoidTrackingSample";
private StringBuilder m_sb = null;
private StringBuilder sb {
get {
if (m_sb == null) { m_sb = new StringBuilder(); }
return m_sb;
}
}
void DEBUG(StringBuilder msg) { Debug.Log(LOG_TAG + " " + msg); }
public HumanoidTracking humanoidTracking = null;
public Button beginBtn = null;
public Text canvasTitle = null;
private void Update()
{
if (humanoidTracking == null || canvasTitle == null) { return; }
canvasTitle.text = humanoidTracking.Tracking + "\n" + "Manually Tracking";
}
public void SetArmMode()
{
if (humanoidTracking != null)
humanoidTracking.Tracking = HumanoidTracking.TrackingMode.Arm;
}
public void SetUpperMode()
{
if (humanoidTracking != null)
humanoidTracking.Tracking = HumanoidTracking.TrackingMode.UpperBody;
}
public void SetFullMode()
{
if (humanoidTracking != null)
humanoidTracking.Tracking = HumanoidTracking.TrackingMode.FullBody;
}
public void SetUpperBodyAndLegMode()
{
if (humanoidTracking != null)
humanoidTracking.Tracking = HumanoidTracking.TrackingMode.UpperBodyAndLeg;
}
public void BeginTracking()
{
if (humanoidTracking != null)
{
if (beginBtn != null) { beginBtn.interactable = false; }
humanoidTracking.BeginTracking();
}
}
public void EndTracking()
{
if (humanoidTracking != null)
{
if (beginBtn != null) { beginBtn.interactable = true; }
humanoidTracking.StopTracking();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 000d651e01f57294aa8d9d71e2b045d3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
// Copyright HTC Corporation All Rights Reserved.
using UnityEngine;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class HumanoidTrackingTeleport : MonoBehaviour
{
public HumanoidTracking humanoidTracking = null;
public Transform offsetOrigin = null;
public Transform offset1 = null;
public Transform offset2 = null;
public Transform offset3 = null;
public void TeleportOrigin()
{
if (humanoidTracking != null && offsetOrigin != null)
humanoidTracking.AvatarOffset = offsetOrigin;
}
public void Teleport1()
{
if (humanoidTracking != null && offset1 != null)
humanoidTracking.AvatarOffset = offset1;
}
public void Teleport2()
{
if (humanoidTracking != null && offset2 != null)
humanoidTracking.AvatarOffset = offset2;
}
public void Teleport3()
{
if (humanoidTracking != null && offset3 != null)
humanoidTracking.AvatarOffset = offset3;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 58d3172d8b4918044a98edb600126b1c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,35 @@
// Copyright HTC Corporation All Rights Reserved.
using UnityEngine;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Demo
{
public class SetTrackerRole : MonoBehaviour
{
public int TrackerIndex = 0;
public BodyManager bodyManager = null;
const int roleNum = 5;
private readonly TrackedDeviceRole[] s_Roles = new TrackedDeviceRole[roleNum]
{
TrackedDeviceRole.ROLE_HIP,
TrackedDeviceRole.ROLE_LEFTWRIST,
TrackedDeviceRole.ROLE_RIGHTWRIST,
TrackedDeviceRole.ROLE_LEFTANKLE,
TrackedDeviceRole.ROLE_RIGHTANKLE,
};
private void Start()
{
OnTrackerRoleChanged(TrackerIndex);
}
public void OnTrackerRoleChanged(int value)
{
if (bodyManager == null || TrackerIndex < 0 || TrackerIndex >= roleNum || value < 0 || value >= roleNum) { return; }
Debug.Log("VIVE.OpenXR.Toolkits.BodyTracking.Demo OnTrackerRoleChanged() Set Tracker " + value + " to role " + s_Roles[value].Name());
bodyManager.SetTrackerRole((uint)TrackerIndex, s_Roles[value]);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 24bbc584e3457364087e6bca80f62416
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: adcc1dd7d1d2ff14da5c36d0c18ee7ce
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,154 @@
// Copyright HTC Corporation All Rights Reserved.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
namespace VIVE.OpenXR.Toolkits.BodyTracking.Editor
{
[CustomEditor(typeof(HumanoidTracking))]
public class HumanoidTrackingEditor : UnityEditor.Editor
{
SerializedProperty m_Tracking, m_AvatarHeight, m_AvatarOffset, m_AvatarScale, m_ContentCalibration;
SerializedProperty m_Head,
m_LeftWrist, m_RightWrist,
m_LeftHandheld, m_RightHandheld,
m_LeftHand, m_RightHand,
m_Hips,
m_LeftLowerLeg, m_RightLowerLeg,
m_LeftFoot, m_RightFoot,
m_LeftToes, m_RightToes;
private void OnEnable()
{
m_Tracking = serializedObject.FindProperty("m_Tracking");
m_AvatarHeight = serializedObject.FindProperty("m_AvatarHeight");
m_AvatarOffset = serializedObject.FindProperty("m_AvatarOffset");
m_AvatarScale = serializedObject.FindProperty("m_AvatarScale");
m_ContentCalibration = serializedObject.FindProperty("m_ContentCalibration");
m_Head = serializedObject.FindProperty("m_Head");
m_LeftWrist = serializedObject.FindProperty("m_LeftWrist");
m_RightWrist = serializedObject.FindProperty("m_RightWrist");
m_LeftHandheld = serializedObject.FindProperty("m_LeftHandheld");
m_RightHandheld = serializedObject.FindProperty("m_RightHandheld");
m_LeftHand = serializedObject.FindProperty("m_LeftHand");
m_RightHand = serializedObject.FindProperty("m_RightHand");
m_Hips = serializedObject.FindProperty("m_Hips");
m_LeftLowerLeg = serializedObject.FindProperty("m_LeftLowerLeg");
m_RightLowerLeg = serializedObject.FindProperty("m_RightLowerLeg");
m_LeftFoot = serializedObject.FindProperty("m_LeftFoot");
m_RightFoot = serializedObject.FindProperty("m_RightFoot");
m_LeftToes = serializedObject.FindProperty("m_LeftToes");
m_RightToes = serializedObject.FindProperty("m_RightToes");
}
bool customizeExtrinsicOptions = false;
public override void OnInspectorGUI()
{
serializedObject.Update();
HumanoidTracking myScript = target as HumanoidTracking;
EditorGUILayout.HelpBox(
"Calibration methods: Arm, Upper Body, Full Body or Upper Bodg + Leg.",
MessageType.Info);
EditorGUILayout.PropertyField(m_Tracking);
EditorGUILayout.HelpBox(
"Calibrates the standard pose inside content.",
MessageType.Info);
EditorGUILayout.PropertyField(m_ContentCalibration);
EditorGUILayout.HelpBox(
"Moves the avatar by applying the position offset.",
MessageType.Info);
EditorGUILayout.PropertyField(m_AvatarOffset);
EditorGUILayout.HelpBox(
"Resize the avatar.",
MessageType.Info);
EditorGUILayout.PropertyField(m_AvatarScale);
myScript.CustomSettings = EditorGUILayout.Toggle("Custom Settings", myScript.CustomSettings);
if (myScript.CustomSettings)
{
EditorGUILayout.HelpBox(
"Sets up the avatar's height instead of using Humanoid (head's height - toes's height).",
MessageType.Info);
EditorGUILayout.PropertyField(m_AvatarHeight);
}
customizeExtrinsicOptions = EditorGUILayout.Foldout(customizeExtrinsicOptions, "Tracked Device Extrinsics");
if (customizeExtrinsicOptions)
{
EditorGUILayout.HelpBox(
"Sets up the tracked devices' extrinsics instead of using default extrinsics.",
MessageType.Info);
myScript.CustomizeExtrinsics = EditorGUILayout.Toggle("Customize Extrinsics", myScript.CustomizeExtrinsics);
if (myScript.CustomizeExtrinsics)
{
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_Head);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_LeftWrist);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_RightWrist);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_LeftHandheld);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_RightHandheld);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_LeftHand);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_RightHand);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_Hips);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_LeftLowerLeg);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_RightLowerLeg);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_LeftFoot);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_RightFoot);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_LeftToes);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(); GUILayout.Space(10);
EditorGUILayout.PropertyField(m_RightToes);
GUILayout.EndHorizontal();
}
}
serializedObject.ApplyModifiedProperties();
if (GUI.changed)
EditorUtility.SetDirty((HumanoidTracking)target);
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cf3e33dafe5d6b348a670e81e20df8c3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5bdfb8c9e66957c49ae3ae27ad4cd8bd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 26ec5fb4b2c1a7741aae4526ef6eea3f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 76b6a43cbc08343498f80117cb062c21
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,614 @@
// Copyright HTC Corporation All Rights Reserved.
//#define TRACKING_LOG
using System;
using System.Collections;
using System.Text;
using UnityEngine;
namespace VIVE.OpenXR.Toolkits.BodyTracking
{
[RequireComponent(typeof(UniHumanoid.Humanoid))]
public class HumanoidTracking : MonoBehaviour
{
#region Log
const string LOG_TAG = "VIVE.OpenXR.Toolkits.BodyTracking.HumanoidTracking";
StringBuilder m_sb = null;
StringBuilder sb {
get {
if (m_sb == null) { m_sb = new StringBuilder(); }
return m_sb;
}
}
void DEBUG(StringBuilder msg) { Debug.Log(LOG_TAG + " " + msg); }
int logFrame = -1;
bool printIntervalLog = false;
void WARNING(StringBuilder msg) { Debug.LogWarning(LOG_TAG + " " + msg); }
void ERROR(StringBuilder msg) { Debug.LogError(LOG_TAG + msg); }
#endregion
public enum TrackingMode : Int32
{
/// <summary> Tracking only head and arms. </summary>
Arm = BodyTrackingMode.ARMIK,
/// <summary> Tracking head, arms and hip. </summary>
UpperBody = BodyTrackingMode.UPPERBODYIK,
/// <summary> Tracking head, arms, hip and ankles. </summary>
FullBody = BodyTrackingMode.FULLBODYIK,
/// <summary> Tracking head, arms, hip, knees and ankles. </summary>
UpperBodyAndLeg = BodyTrackingMode.UPPERIKANDLEGFK,
}
#region Inspector
[SerializeField]
private TrackingMode m_Tracking = TrackingMode.FullBody;
public TrackingMode Tracking { get { return m_Tracking; } set { m_Tracking = value; } }
[SerializeField]
private bool m_ContentCalibration = true;
public bool ContentCalibration => m_ContentCalibration;
[SerializeField]
private bool m_CustomSettings = false;
public bool CustomSettings { get { return m_CustomSettings; } set { m_CustomSettings = value; } }
[SerializeField]
private float m_AvatarHeight = 1.5f;
public float AvatarHeight {
get { return m_AvatarHeight; }
set {
if (value > 0) { m_AvatarHeight = value; }
}
}
[SerializeField]
private Transform m_AvatarOffset = null;
public Transform AvatarOffset { get { return m_AvatarOffset; } set { m_AvatarOffset = value; } }
[SerializeField]
[Range(0.2f, 5f)]
private float m_AvatarScale = 1;
public float AvatarScale { get { return m_AvatarScale; } set { m_AvatarScale = value; } }
[SerializeField]
private bool m_CustomizeExtrinsics = false;
public bool CustomizeExtrinsics { get { return m_CustomizeExtrinsics; } set { m_CustomizeExtrinsics = value; } }
/// Humanoid Head
[SerializeField]
private ExtrinsicInfo_t m_Head = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0, -0.08f, -0.1f), new Vector4(0, 0, 0, 1)));
public ExtrinsicInfo_t Head => m_Head;
/// Humanoid Hand
[SerializeField]
private ExtrinsicInfo_t m_LeftWrist = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0.0f, -0.035f, 0.043f), new Vector4(0.0f, 0.707f, 0.0f, 0.707f)));
public ExtrinsicInfo_t LeftWrist => m_LeftWrist;
[SerializeField]
private ExtrinsicInfo_t m_RightWrist = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0.0f, -0.035f, 0.043f), new Vector4(0.0f, -0.707f, 0.0f, 0.707f)));
public ExtrinsicInfo_t RightWrist => m_RightWrist;
/// Humanoid Hand
[SerializeField]
private ExtrinsicInfo_t m_LeftHandheld = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(-0.03f, -0.035f, -0.13f), new Vector4(-0.345273f, 0.639022f, 0.462686f, 0.508290f)));
public ExtrinsicInfo_t LeftHandheld => m_LeftHandheld;
[SerializeField]
private ExtrinsicInfo_t m_RightHandheld = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0.03f, -0.035f, -0.13f), new Vector4(-0.345273f, -0.639022f, -0.462686f, 0.508290f)));
public ExtrinsicInfo_t RightHandheld => m_RightHandheld;
/// Humanoid Hand
[SerializeField]
private ExtrinsicInfo_t m_LeftHand = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(Vector3.zero, new Vector4(0.094802f, 0.641923f, -0.071626f, 0.757508f)));
public ExtrinsicInfo_t LeftHand => m_LeftHand;
[SerializeField]
private ExtrinsicInfo_t m_RightHand = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(Vector3.zero, new Vector4(0.094802f, -0.641923f, -0.071626f, 0.757508f)));
public ExtrinsicInfo_t RightHand => m_RightHand;
/// Humanoid Hips
[SerializeField]
private ExtrinsicInfo_t m_Hips = new ExtrinsicInfo_t(true, ExtrinsicVector4_t.identity);
public ExtrinsicInfo_t Hips => m_Hips;
/// Humanoid LowerLeg = TrackedDeviceRole Knee
[SerializeField]
private ExtrinsicInfo_t m_LeftLowerLeg = new ExtrinsicInfo_t(true, ExtrinsicVector4_t.identity);
public ExtrinsicInfo_t LeftLowerLeg => m_LeftLowerLeg;
[SerializeField]
private ExtrinsicInfo_t m_RightLowerLeg = new ExtrinsicInfo_t(true, ExtrinsicVector4_t.identity);
public ExtrinsicInfo_t RightLowerLeg => m_RightLowerLeg;
/// Humanoid Foot = TrackedDeviceRole Ankle
[SerializeField]
private ExtrinsicInfo_t m_LeftFoot = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0.0f, -0.05f, 0.0f), new Vector4(-0.5f, 0.5f, 0.5f, -0.5f)));
public ExtrinsicInfo_t LeftFoot => m_LeftFoot;
[SerializeField]
private ExtrinsicInfo_t m_RightFoot = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0.0f, -0.05f, 0.0f), new Vector4(0.5f, 0.5f, 0.5f, 0.5f)));
public ExtrinsicInfo_t RightFoot => m_RightFoot;
/// Humanoid Toes = TrackedDeviceRole Foot
[SerializeField]
private ExtrinsicInfo_t m_LeftToes = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0, 0, -0.13f), new Vector4(0, 0, 0, -1)));
public ExtrinsicInfo_t LeftToes => m_LeftToes;
[SerializeField]
private ExtrinsicInfo_t m_RightToes = new ExtrinsicInfo_t(true, new ExtrinsicVector4_t(new Vector3(0, 0, -0.13f), new Vector4(0, 0, 0, -1)));
public ExtrinsicInfo_t RightToes => m_RightToes;
#endregion
private UniHumanoid.Humanoid m_Humanoid = null;
private Body m_Body = null, m_InitialBody = null;
private TransformData m_InitialTransform;
/// <summary> Humanoid should have at least 20 joints in function. </summary>
private bool AssignHumanoidToBody(ref Body body)
{
m_Humanoid = GetComponent<UniHumanoid.Humanoid>();
if (m_Humanoid == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid."); ERROR(sb);
return false;
}
// 0.hip
if (m_Humanoid.Hips == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid Hips."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid Hips -> Body root."); DEBUG(sb);
body.root = m_Humanoid.Hips;
}
// 1.leftThigh
if (m_Humanoid.LeftUpperLeg == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftUpperLeg."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftUpperLeg -> Body leftThigh."); DEBUG(sb);
body.leftThigh = m_Humanoid.LeftUpperLeg;
}
// 2.leftLeg
if (m_Humanoid.LeftLowerLeg == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftLowerLeg."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftLowerLeg -> Body leftLeg."); DEBUG(sb);
body.leftLeg = m_Humanoid.LeftLowerLeg;
}
// 3.leftAnkle
if (m_Humanoid.LeftFoot == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftFoot."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftFoot -> Body leftAnkle."); DEBUG(sb);
body.leftAnkle = m_Humanoid.LeftFoot;
}
// 4.leftFoot
if (m_Humanoid.LeftToes == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftToes."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftToes -> Body leftFoot."); DEBUG(sb);
body.leftFoot = m_Humanoid.LeftToes;
}
// 5.rightThigh
if (m_Humanoid.RightUpperLeg == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightUpperLeg."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightUpperLeg -> Body rightThigh."); DEBUG(sb);
body.rightThigh = m_Humanoid.RightUpperLeg;
}
// 6.rightLeg
if (m_Humanoid.RightLowerLeg == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightLowerLeg."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightLowerLeg -> Body rightLeg."); DEBUG(sb);
body.rightLeg = m_Humanoid.RightLowerLeg;
}
// 7.rightAnkle
if (m_Humanoid.RightFoot == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightFoot."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightFoot -> Body rightAnkle."); DEBUG(sb);
body.rightAnkle = m_Humanoid.RightFoot;
}
// 8.rightFoot
if (m_Humanoid.RightToes == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightToes."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightToes -> Body rightFoot."); DEBUG(sb);
body.rightFoot = m_Humanoid.RightToes;
}
body.spineLower = m_Humanoid.Spine;
// 9.chest
if (m_Humanoid.UpperChest == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid UpperChest."); WARNING(sb);
if (m_Humanoid.Chest == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid Chest."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid Chest -> Body chest."); DEBUG(sb);
body.chest = m_Humanoid.Chest;
}
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid UpperChest -> Body chest."); DEBUG(sb);
body.chest = m_Humanoid.UpperChest;
sb.Clear().Append("AssignHumanoidToBody() Humanoid Chest -> Body spineHigh."); DEBUG(sb);
body.spineHigh = m_Humanoid.Chest;
}
// 10.neck
if (m_Humanoid.Neck == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid Neck."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid Neck -> Body neck."); DEBUG(sb);
body.neck = m_Humanoid.Neck;
}
// 11.head
if (m_Humanoid.Head == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid Head."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid Head -> Body head."); DEBUG(sb);
body.head = m_Humanoid.Head;
}
// 12.leftClavicle
if (m_Humanoid.LeftShoulder == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftShoulder."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftShoulder -> Body leftClavicle."); DEBUG(sb);
body.leftClavicle = m_Humanoid.LeftShoulder;
}
// 13.leftUpperarm
if (m_Humanoid.LeftUpperArm == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftUpperArm."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftUpperArm -> Body leftUpperarm."); DEBUG(sb);
body.leftUpperarm = m_Humanoid.LeftUpperArm;
}
// 14.leftForearm
if (m_Humanoid.LeftLowerArm == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftLowerArm."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftLowerArm -> Body leftForearm."); DEBUG(sb);
body.leftForearm = m_Humanoid.LeftLowerArm;
}
// 15.leftHand
if (m_Humanoid.LeftHand == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid LeftHand."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid LeftHand -> Body leftHand."); DEBUG(sb);
body.leftHand = m_Humanoid.LeftHand;
}
// 16.rightClavicle
if (m_Humanoid.RightShoulder == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightShoulder."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightShoulder -> Body rightClavicle."); DEBUG(sb);
body.rightClavicle = m_Humanoid.RightShoulder;
}
// 17.rightUpperarm
if (m_Humanoid.RightUpperArm == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightUpperArm."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightUpperArm -> Body rightUpperarm."); DEBUG(sb);
body.rightUpperarm = m_Humanoid.RightUpperArm;
}
// 18.rightForearm
if (m_Humanoid.RightLowerArm == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightLowerArm."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightLowerArm -> Body rightForearm."); DEBUG(sb);
body.rightForearm = m_Humanoid.RightLowerArm;
}
// 19.rightHand
if (m_Humanoid.RightHand == null)
{
sb.Clear().Append("AssignHumanoidToBody() no Humanoid RightHand."); ERROR(sb);
return false;
}
else
{
sb.Clear().Append("AssignHumanoidToBody() Humanoid RightHand -> Body rightHand."); DEBUG(sb);
body.rightHand = m_Humanoid.RightHand;
}
if (m_CustomSettings)
{
body.height = m_AvatarHeight;
sb.Clear().Append("AssignHumanoidToBody() height: ").Append(body.height);
DEBUG(sb);
}
else
{
float floor = Mathf.Min(m_Humanoid.LeftToes.position.y, m_Humanoid.RightToes.position.y);
body.height = m_Humanoid.Head.position.y - floor;
sb.Clear().Append("AssignHumanoidToBody() Calculates height:")
.Append(" LeftToes (").Append(m_Humanoid.LeftToes.position.y).Append(")")
.Append(", RightToes(").Append(m_Humanoid.RightToes.position.y).Append(")")
.Append(", Head(").Append(m_Humanoid.Head.position.y).Append(")")
.Append(", height: ").Append(body.height);
DEBUG(sb);
}
return true;
}
private TrackerExtrinsic m_CustomExts = new TrackerExtrinsic();
private void Awake()
{
if (m_CustomizeExtrinsics)
{
sb.Clear().Append("Awake() Customize device extrinsics."); DEBUG(sb);
m_CustomExts.Update(TrackedDeviceRole.ROLE_HEAD, m_Head);
m_CustomExts.Update(TrackedDeviceRole.ROLE_LEFTWRIST, m_LeftWrist);
m_CustomExts.Update(TrackedDeviceRole.ROLE_RIGHTWRIST, m_RightWrist);
m_CustomExts.Update(TrackedDeviceRole.ROLE_LEFTHANDHELD, m_LeftHandheld);
m_CustomExts.Update(TrackedDeviceRole.ROLE_RIGHTHANDHELD, m_RightHandheld);
m_CustomExts.Update(TrackedDeviceRole.ROLE_LEFTHAND, m_LeftHand);
m_CustomExts.Update(TrackedDeviceRole.ROLE_RIGHTHAND, m_RightHand);
m_CustomExts.Update(TrackedDeviceRole.ROLE_HIP, m_Hips);
m_CustomExts.Update(TrackedDeviceRole.ROLE_LEFTKNEE, m_LeftLowerLeg);
m_CustomExts.Update(TrackedDeviceRole.ROLE_RIGHTKNEE, m_RightLowerLeg);
m_CustomExts.Update(TrackedDeviceRole.ROLE_LEFTANKLE, m_LeftFoot);
m_CustomExts.Update(TrackedDeviceRole.ROLE_RIGHTANKLE, m_RightFoot);
m_CustomExts.Update(TrackedDeviceRole.ROLE_LEFTFOOT, m_LeftToes);
m_CustomExts.Update(TrackedDeviceRole.ROLE_RIGHTFOOT, m_RightToes);
}
sb.Clear().Append("Awake() Records the initial body position and scale."); DEBUG(sb);
m_InitialTransform = new TransformData(transform);
}
private void Update()
{
logFrame++;
logFrame %= 300;
printIntervalLog = (logFrame == 0);
}
private void OnDisable()
{
StopTracking();
}
bool updateTrackingData = false;
public void BeginTracking()
{
sb.Clear().Append("BeginTracking() tracking mode: ").Append(m_Tracking); DEBUG(sb);
if (m_Body == null)
{
sb.Clear().Append("StartFixUpdateBodyTracking() Configures Humanoid avatar."); DEBUG(sb);
m_Body = new Body();
if (!AssignHumanoidToBody(ref m_Body))
{
sb.Clear().Append("StartFixUpdateBodyTracking() AssignHumanoidToBody failed."); ERROR(sb);
m_Body = null;
return;
}
}
if (m_InitialBody == null)
{
sb.Clear().Append("BeginTracking() Records the initial standard pose."); DEBUG(sb);
m_InitialBody = new Body();
m_InitialBody.UpdateData(m_Body);
}
updateTrackingData = true;
StartCoroutine(StartFixUpdateBodyTracking());
}
public void StopTracking()
{
updateTrackingData = false;
sb.Clear().Append("StopTracking() Recovers the initial standard pose, body position and scale."); DEBUG(sb);
if (m_Body != null && m_InitialBody != null) { m_InitialBody.UpdateBody(ref m_Body); }
RecoverBodyScale();
RecoverBodyOffset();
}
private void ApplyBodyScale(float scale)
{
transform.localScale *= scale;
}
private void RecoverBodyScale()
{
transform.localScale = m_InitialTransform.localScale;
}
private void ApplyBodyOffsetEachFrame(Transform offset)
{
if (offset != null)
{
transform.localPosition = offset.rotation * transform.localPosition;
transform.localPosition += offset.position;
transform.localRotation *= offset.rotation;
}
}
private void RecoverBodyOffset()
{
transform.localPosition = m_InitialTransform.localPosition;
transform.localRotation = m_InitialTransform.localRotation;
}
private int m_AvatarID = -1;
public IEnumerator StartFixUpdateBodyTracking()
{
if (BodyManager.Instance == null) { yield return null; }
sb.Clear().Append("StartFixUpdateBodyTracking()"); DEBUG(sb);
yield return new WaitForSeconds(3f);
BodyTrackingResult result;
if (m_ContentCalibration)
{
result = BodyManager.Instance.SetStandardPose((BodyTrackingMode)m_Tracking);
sb.Clear().Append("StartFixUpdateBodyTracking() SetStandardPose result ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
}
if (!m_CustomizeExtrinsics)
{
sb.Clear().Append("StartFixUpdateBodyTracking() CreateBodyTracking with custom avatar + standard extrinsics."); DEBUG(sb);
result = BodyManager.Instance.CreateBodyTracking(ref m_AvatarID, m_Body, (BodyTrackingMode)m_Tracking);
}
else
{
sb.Clear().Append("StartFixUpdateBodyTracking() CreateBodyTracking with custom avatar + custom extrinsics."); DEBUG(sb);
result = BodyManager.Instance.CreateBodyTracking(ref m_AvatarID, m_Body, m_CustomExts, (BodyTrackingMode)m_Tracking);
}
sb.Clear().Append("StartFixUpdateBodyTracking() CreateBodyTracking result ").Append(result.Name()).Append(", id: ").Append(m_AvatarID); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
result = BodyManager.Instance.GetBodyTrackingInfo(m_AvatarID, out float avatarHeight, out float avatarScale);
sb.Clear().Append("StartFixUpdateBodyTracking() GetBodyTrackingInfo result ").Append(result.Name()); DEBUG(sb);
if (result != BodyTrackingResult.SUCCESS) { yield break; }
// Due to the pose from GetBodyTrackingPoseOnce is "scaled pose", we need to change the avatar mesh size first.
sb.Clear().Append("StartFixUpdateBodyTracking() Apply avatar scale with ").Append(avatarScale); DEBUG(sb);
ApplyBodyScale(avatarScale * m_AvatarScale);
while (updateTrackingData)
{
result = BodyManager.Instance.GetBodyTrackingPoseOnce(m_AvatarID, out BodyAvatar avatarBody);
if (result == BodyTrackingResult.SUCCESS)
{
RecoverBodyOffset();
UpdateBodyPosesInOrder(avatarBody, m_AvatarScale);
ApplyBodyOffsetEachFrame(m_AvatarOffset);
}
yield return new WaitForEndOfFrame();
}
result = BodyManager.Instance.DestroyBodyTracking(m_AvatarID);
sb.Clear().Append("StartFixUpdateBodyTracking() DestroyBodyTracking result ").Append(result.Name()).Append(", id: ").Append(m_AvatarID); DEBUG(sb);
yield return null;
}
/// <summary>
/// Update the body joints poses according to the avatar joint order.
/// If your avatar joint order is different, you have to modify this function.
/// </summary>
/// <param name="avatarBody">The avatar IK pose from plugin.</param>
private void UpdateBodyPosesInOrder(BodyAvatar avatarBody, float scale = 1)
{
if (m_Body == null || avatarBody == null) { return; }
if (printIntervalLog)
{
sb.Clear().Append("UpdateBodyPosesInOrder() new avatar height ").Append(avatarBody.height)
.Append(", original avatar height ").Append(m_InitialBody.height)
.Append(", scale: ").Append(avatarBody.scale);
DEBUG(sb);
}
if (m_Body.root != null) avatarBody.Update(JointType.HIP, ref m_Body.root, scale); // 0
if (m_Body.leftThigh != null) avatarBody.Update(JointType.LEFTTHIGH, ref m_Body.leftThigh, scale);
if (m_Body.leftLeg != null) avatarBody.Update(JointType.LEFTLEG, ref m_Body.leftLeg, scale);
if (m_Body.leftAnkle != null) avatarBody.Update(JointType.LEFTANKLE, ref m_Body.leftAnkle, scale);
if (m_Body.leftFoot != null) avatarBody.Update(JointType.LEFTFOOT, ref m_Body.leftFoot, scale);
if (m_Body.rightThigh != null) avatarBody.Update(JointType.RIGHTTHIGH, ref m_Body.rightThigh, scale); // 5
if (m_Body.rightLeg != null) avatarBody.Update(JointType.RIGHTLEG, ref m_Body.rightLeg, scale);
if (m_Body.rightAnkle != null) avatarBody.Update(JointType.RIGHTANKLE, ref m_Body.rightAnkle, scale);
if (m_Body.rightFoot != null) avatarBody.Update(JointType.RIGHTFOOT, ref m_Body.rightFoot, scale);
if (m_Body.waist != null) avatarBody.Update(JointType.WAIST, ref m_Body.waist, scale);
if (m_Body.spineLower != null) avatarBody.Update(JointType.SPINELOWER, ref m_Body.spineLower, scale); // 10
if (m_Body.spineMiddle != null) avatarBody.Update(JointType.SPINEMIDDLE, ref m_Body.spineMiddle, scale);
if (m_Body.spineHigh != null) avatarBody.Update(JointType.SPINEHIGH, ref m_Body.spineHigh, scale);
if (m_Body.chest != null) avatarBody.Update(JointType.CHEST, ref m_Body.chest, scale);
if (m_Body.neck != null) avatarBody.Update(JointType.NECK, ref m_Body.neck, scale);
if (m_Body.head != null) avatarBody.Update(JointType.HEAD, ref m_Body.head, scale); // 15
if (m_Body.leftClavicle != null) avatarBody.Update(JointType.LEFTCLAVICLE, ref m_Body.leftClavicle, scale);
if (m_Body.leftScapula != null) avatarBody.Update(JointType.LEFTSCAPULA, ref m_Body.leftScapula, scale);
if (m_Body.leftUpperarm != null) avatarBody.Update(JointType.LEFTUPPERARM, ref m_Body.leftUpperarm, scale);
if (m_Body.leftForearm != null) avatarBody.Update(JointType.LEFTFOREARM, ref m_Body.leftForearm, scale);
if (m_Body.leftHand != null) avatarBody.Update(JointType.LEFTHAND, ref m_Body.leftHand, scale); // 20
if (m_Body.rightClavicle != null) avatarBody.Update(JointType.RIGHTCLAVICLE, ref m_Body.rightClavicle, scale);
if (m_Body.rightScapula != null) avatarBody.Update(JointType.RIGHTSCAPULA, ref m_Body.rightScapula, scale);
if (m_Body.rightUpperarm != null) avatarBody.Update(JointType.RIGHTUPPERARM, ref m_Body.rightUpperarm, scale);
if (m_Body.rightForearm != null) avatarBody.Update(JointType.RIGHTFOREARM, ref m_Body.rightForearm, scale);
if (m_Body.rightHand != null) avatarBody.Update(JointType.RIGHTHAND, ref m_Body.rightHand, scale); // 25
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ed11272e7bfee534a960501519ffbeb5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,70 @@
fileFormatVersion: 2
guid: 078b604ba003c594aa601469dea87b6f
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARM64
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: x86_64
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f4e412f9f804a0b4795884375a330ef8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d0c5b2c9f7011844eb0adcb332b198d4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9882d844b6530d34ea501d8bef961615
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,809 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &480584427560805549
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 232829821795803747}
- component: {fileID: 3269750057623909300}
- component: {fileID: 8366549838753617093}
m_Layer: 0
m_Name: __CM__ButtonY
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &232829821795803747
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 480584427560805549}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.020758, y: -0.02237, z: 0.038489997}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3269750057623909300
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 480584427560805549}
m_Mesh: {fileID: -3389035218075753420, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &8366549838753617093
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 480584427560805549}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1667188625272475831
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9113575972332351389}
- component: {fileID: 2446007755967565169}
- component: {fileID: 6840161337912925378}
m_Layer: 0
m_Name: __CM__AppButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &9113575972332351389
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1667188625272475831}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.00185, y: -0.021932999, z: 0.050890002}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &2446007755967565169
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1667188625272475831}
m_Mesh: {fileID: -7724262373863937146, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &6840161337912925378
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1667188625272475831}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &2284107324174596760
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 370599724700804545}
- component: {fileID: 3283930148250737566}
- component: {fileID: 2477149265411740731}
m_Layer: 0
m_Name: __CM__Emitter
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &370599724700804545
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2284107324174596760}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.01, y: -0.026537735, z: 0.0057997853}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3283930148250737566
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2284107324174596760}
m_Mesh: {fileID: -4521666590143857035, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &2477149265411740731
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2284107324174596760}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &3865433201665247296
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4534869363377984250}
- component: {fileID: 3865433201665247297}
m_Layer: 0
m_Name: Focus3L
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4534869363377984250
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3865433201665247296}
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5172060680359753948}
- {fileID: 8316335397892084205}
- {fileID: 5659940845407081040}
- {fileID: 1571381885952892817}
- {fileID: 232829821795803747}
- {fileID: 9113575972332351389}
- {fileID: 4100507742664250948}
- {fileID: 3563995214686920467}
- {fileID: 370599724700804545}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3865433201665247297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3865433201665247296}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 77d4e1571356f344e8b6594829328885, type: 3}
m_Name:
m_EditorClassIdentifier:
IsLeft: 1
Asset: {fileID: -944628639613478452, guid: 7731a6c81e069424eb7df31b19b84b41, type: 3}
TriggerAxis: {fileID: 2526168894431210536, guid: 7731a6c81e069424eb7df31b19b84b41, type: 3}
GripAxis: {fileID: -1289947363739713011, guid: 7731a6c81e069424eb7df31b19b84b41, type: 3}
ThumbstickAxis: {fileID: 7596212294181904713, guid: 7731a6c81e069424eb7df31b19b84b41, type: 3}
PrimaryButtonClick: {fileID: 5113088590926889233, guid: 7731a6c81e069424eb7df31b19b84b41, type: 3}
SecondButtonClick: {fileID: -631344258065148156, guid: 7731a6c81e069424eb7df31b19b84b41, type: 3}
--- !u!1 &3866745915763103840
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5659940845407081040}
- component: {fileID: 2507876876020217791}
- component: {fileID: 1639401241684627239}
m_Layer: 0
m_Name: __CM__Thumbstick
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5659940845407081040
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3866745915763103840}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.00059, y: -0.021856, z: 0.033832}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &2507876876020217791
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3866745915763103840}
m_Mesh: {fileID: 6699701932830050619, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &1639401241684627239
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3866745915763103840}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4156550811623347726
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5172060680359753948}
- component: {fileID: 2894897272603856847}
- component: {fileID: 4486028616907730149}
m_Layer: 0
m_Name: __CM__TriggerKey
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5172060680359753948
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4156550811623347726}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.0016109999, y: -0.036925998, z: 0.012113}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &2894897272603856847
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4156550811623347726}
m_Mesh: {fileID: -2870439426993565530, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &4486028616907730149
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4156550811623347726}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4638586797985352204
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8316335397892084205}
- component: {fileID: 2470973409219776566}
- component: {fileID: 1376135078873526724}
m_Layer: 0
m_Name: __CM__Grip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8316335397892084205
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4638586797985352204}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.01429, y: -0.042602, z: 0.071612}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &2470973409219776566
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4638586797985352204}
m_Mesh: {fileID: 4793660613219112997, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &1376135078873526724
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4638586797985352204}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4913548987557823638
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1571381885952892817}
- component: {fileID: 4025148608747714257}
- component: {fileID: 4697790304744543534}
m_Layer: 0
m_Name: __CM__ButtonX
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1571381885952892817
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4913548987557823638}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.013948999, y: -0.022376, z: 0.049917996}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4025148608747714257
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4913548987557823638}
m_Mesh: {fileID: 1688988785635390117, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &4697790304744543534
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4913548987557823638}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &7715060063185900202
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3563995214686920467}
- component: {fileID: 306901530505576897}
- component: {fileID: 5318686841401265704}
m_Layer: 0
m_Name: __CM__Body
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3563995214686920467
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7715060063185900202}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.006947, y: -0.053136, z: 0.074193}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &306901530505576897
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7715060063185900202}
m_Mesh: {fileID: -5532471787532314371, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &5318686841401265704
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7715060063185900202}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7bd853ac3a8665b43aaaca46b5fabb58, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &7973183329423369909
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4100507742664250948}
- component: {fileID: 9151783709345708115}
- component: {fileID: 1658786680291909208}
m_Layer: 0
m_Name: __CM__Battery
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4100507742664250948
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7973183329423369909}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.031353053, y: -0.020905372, z: 0.025925392}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4534869363377984250}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &9151783709345708115
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7973183329423369909}
m_Mesh: {fileID: -3454782138029922092, guid: bb79b757085694c41b30102acd8fb97f, type: 3}
--- !u!23 &1658786680291909208
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7973183329423369909}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 6487db3b373a54240adebaa1e8546191, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 01346f54cffb6ac4a9e0261d1d155466
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More