This commit is contained in:
2025-05-16 23:31:59 +08:00
parent 9e4fef3f1e
commit d891e3f0ee
1198 changed files with 274242 additions and 1558 deletions

View File

@@ -3,14 +3,14 @@ using UnityEngine;
namespace NBF
{
public class PlayArm : MonoBehaviour
public class PlayerArm : MonoBehaviour
{
public bool IsLeft;
public LimbIK IK;
public Transform RodContainer;
public Transform LeftRigMagnet;
public FingerRig FingerRig;
public PlayerShoulder Shoulder;//PlayerShoulder
[HideInInspector] public float interactionTargetWeight;

View File

@@ -0,0 +1,37 @@
using System;
using UnityEngine;
namespace NBF
{
public class PlayerShoulder : MonoBehaviour
{
private Vector3 startEulerAngles;
private const int MaxAngle = 30;
private const int MinAngle = -30;
public float TestZ;
private void Awake()
{
startEulerAngles = transform.localEulerAngles;
}
public void SetCameraEulerAngleX(float value)
{
value = (value > 180f) ? value - 360f : value;
Debug.Log($"value={value}");
var addValue = value * -1;
if (addValue > MaxAngle)
{
addValue = MaxAngle;
}
else if (addValue < MinAngle)
{
addValue = MinAngle;
}
transform.localEulerAngles =
new Vector3(addValue + startEulerAngles.x, startEulerAngles.y, TestZ);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0d621debd7244988afb98b7c06605f63
timeCreated: 1747228668