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,38 @@
using BlockSpace.Voxels;
using UnityEngine;
[DisallowMultipleComponent]
public sealed class HandRotationsBehavior : NodeBehavior
{
public override void OnGraphUpdate()
{
Transform transform = ((VRVoxelBrush.Instance != null) ? VRVoxelBrush.Instance.LeftHandAnchor : null);
Transform transform2 = ((VRVoxelBrush.Instance != null) ? VRVoxelBrush.Instance.RightHandAnchor : null);
if (transform != null)
{
Vector3 eulerAngles = transform.rotation.eulerAngles;
SetLocalOutputValueIfChanged("Left Yaw", BSValue.FromNumber(eulerAngles.y));
SetLocalOutputValueIfChanged("Left Pitch", BSValue.FromNumber(eulerAngles.x));
SetLocalOutputValueIfChanged("Left Roll", BSValue.FromNumber(eulerAngles.z));
}
else
{
SetLocalOutputValueIfChanged("Left Yaw", BSValue.None);
SetLocalOutputValueIfChanged("Left Pitch", BSValue.None);
SetLocalOutputValueIfChanged("Left Roll", BSValue.None);
}
if (transform2 != null)
{
Vector3 eulerAngles2 = transform2.rotation.eulerAngles;
SetLocalOutputValueIfChanged("Right Yaw", BSValue.FromNumber(eulerAngles2.y));
SetLocalOutputValueIfChanged("Right Pitch", BSValue.FromNumber(eulerAngles2.x));
SetLocalOutputValueIfChanged("Right Roll", BSValue.FromNumber(eulerAngles2.z));
}
else
{
SetLocalOutputValueIfChanged("Right Yaw", BSValue.None);
SetLocalOutputValueIfChanged("Right Pitch", BSValue.None);
SetLocalOutputValueIfChanged("Right Roll", BSValue.None);
}
}
}