保存进度
This commit is contained in:
@@ -3,15 +3,33 @@ using UnityEngine;
|
||||
|
||||
public class ArmTest : MonoBehaviour
|
||||
{
|
||||
public Vector3 target;
|
||||
public Vector3 target = new Vector3(0, 0, 0);
|
||||
|
||||
public Transform targetTransform;
|
||||
// public float Value;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
target = transform.localEulerAngles;
|
||||
// target = transform.localEulerAngles;
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
transform.localEulerAngles = target;
|
||||
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);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -333,6 +333,7 @@ namespace NBF
|
||||
{
|
||||
animator = GetComponent<Animator>();
|
||||
}
|
||||
|
||||
|
||||
#region 动画事件回调
|
||||
|
||||
|
||||
22
Assets/Scripts/Fishing/Player/FixedLine.cs
Normal file
22
Assets/Scripts/Fishing/Player/FixedLine.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class FixedLine : MonoBehaviour
|
||||
{
|
||||
public Transform target;
|
||||
private Rigidbody _rigidbody;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_rigidbody = GetComponent<Rigidbody>();
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (!target) return;
|
||||
_rigidbody.MovePosition(target.position);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Fishing/Player/FixedLine.cs.meta
Normal file
3
Assets/Scripts/Fishing/Player/FixedLine.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 112f7ad42d8149c1944bb51067ef1966
|
||||
timeCreated: 1747411443
|
||||
@@ -21,14 +21,8 @@ public class FLineHandler : MonoBehaviour
|
||||
public ObiRope obiRopeSegment_2;
|
||||
|
||||
public ObiRope obiRopeSegment_3;
|
||||
|
||||
public ObiRopeCursor obiRopeCursor_1;
|
||||
|
||||
public ObiRopeCursor obiRopeCursor_2;
|
||||
|
||||
public ObiRopeCursor obiRopeCursor_3;
|
||||
|
||||
public FixedJoint LineConnector_0;
|
||||
|
||||
public FixedLine LineConnector_0;
|
||||
|
||||
public SpringJoint LineConnector_1;
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ public class FRod : FPlayerGear
|
||||
lineHandler = obj.GetComponent<FLineHandler>();
|
||||
// lineHandler.transform.SetParent(toRodConnector.transform);
|
||||
lineHandler.transform.position = rodAsset.lineConnector.position;
|
||||
lineHandler.LineConnector_0.connectedBody = rodAsset.lineConnector.GetComponent<Rigidbody>();
|
||||
lineHandler.LineConnector_0.target = rodAsset.lineConnector;//.GetComponent<Rigidbody>();
|
||||
// lineHandler.toRodConnector.target = rodAsset.lineConnector;
|
||||
lineHandler.Rod = this;
|
||||
var obiSolver = lineHandler.GetComponent<ObiSolver>();
|
||||
|
||||
Reference in New Issue
Block a user