Files
Fishing2/Assets/Scripts/ArmTest.cs
2025-05-17 22:33:16 +08:00

35 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using UnityEngine;
public class ArmTest : MonoBehaviour
{
public Vector3 target = new Vector3(0, 0, 0);
public Transform targetTransform;
// public float Value;
private void Start()
{
// target = transform.localEulerAngles;
}
private void LateUpdate()
{
if (!targetTransform) return;
// transform.localEulerAngles = target;
targetTransform.localRotation *= Quaternion.Euler(target.x, target.y, target.z);
//我草拟吗。transform.localEulerAngle = target;
//wo shi da sha bi. ArmTest Monobehaviour
//我草拟大爷的。transofrm.localEulerAngles = target;
// void LateUpdate()
// {
// Transform shoulder = animator.GetBoneTransform(HumanBodyBones.RightUpperArm);
// if (shoulder != null)
// {
// // 局部旋转叠加例如绕Z轴微调
// shoulder.localRotation *= Quaternion.Euler(0, 0, shoulderOffsetAngle);
// }
// }
}
}