Replace UltimateXR with HurricaneVR

This commit is contained in:
2024-08-08 17:01:07 +02:00
parent e8658374d6
commit fb21dbbb73
5932 changed files with 358362 additions and 2174150 deletions

View File

@@ -0,0 +1,40 @@
using HurricaneVR.Framework.Components;
using UnityEditor;
using UnityEngine;
namespace HurricaneVR.Editor
{
[CustomEditor(typeof(HVRPhysicsDial), true)]
public class HVRPhysicsDialEditor : UnityEditor.Editor
{
public SerializedProperty SP_StartRotation;
public HVRPhysicsDial Dial;
protected void OnEnable()
{
SP_StartRotation = serializedObject.FindProperty("JointStartRotation");
Dial = target as HVRPhysicsDial;
}
public override void OnInspectorGUI()
{
if (GUILayout.Button("Save Joint Start Rotation"))
{
SP_StartRotation.quaternionValue = Dial.transform.localRotation;
}
EditorGUILayout.HelpBox("Joints limits are based on their starting rotation and have a maximum limit of 177." +
"\r\n1. Rotate the transform to where you want the joint limits to start from and press 'Save Joint Start Rotation'. " +
"\r\n2. Rotate the transform to where you want it start at, making sure it's within your defined limit." +
"\r\n3. Choose the local axis of rotation." +
"\r\n4. If you needs limits larger than 177 degrees in either direction. Use HVRRotationTracker + HVRRotationLimiter."
, MessageType.Info);
serializedObject.ApplyModifiedProperties();
base.OnInspectorGUI();
}
}
}