EVERYTHING

This commit is contained in:
niko
2026-06-01 17:19:55 +02:00
parent d063b81359
commit b62bac090b
1081 changed files with 1716544 additions and 0 deletions
@@ -0,0 +1,26 @@
using UnityEngine;
using UnityEngine.XR;
[DisallowMultipleComponent]
public sealed class PrimaryInputBehavior : NodeBehavior
{
private const float GripThreshold = 0.7f;
private const float TriggerThreshold = 0.7f;
public override void OnGraphUpdate()
{
bool flag = Input.GetMouseButton(0);
InputDevice deviceAtXRNode = InputDevices.GetDeviceAtXRNode(XRNode.RightHand);
if (deviceAtXRNode.isValid)
{
float value;
bool value2;
bool flag2 = (deviceAtXRNode.TryGetFeatureValue(CommonUsages.grip, out value) && value >= 0.7f) || (deviceAtXRNode.TryGetFeatureValue(CommonUsages.gripButton, out value2) && value2);
float value3;
bool flag3 = deviceAtXRNode.TryGetFeatureValue(CommonUsages.trigger, out value3) && value3 >= 0.7f;
flag = flag || (flag2 && flag3);
}
SetLocalOutputValueIfChanged("Held", BSValue.FromBool(flag));
}
}