视角控制

This commit is contained in:
2025-05-18 00:51:35 +08:00
parent 3609f3e462
commit ee237ad25a
3 changed files with 1271 additions and 94 deletions

View File

@@ -13,18 +13,10 @@ public partial class FPlayer : MonoBehaviour
/// </summary>
public Transform CameraRoot;
public Transform rHandRodJoiner => MainArm.RodContainer;
public FRod assignRod;
// [HideInInspector] public FRod currentRod;
private CCDIK interactionCCDIK;
private float interactionTargetWeight;
[HideInInspector] public float handPullUp;
public Fsm<FPlayer> Fsm { get; private set; }
private PlayerArm[] Arms;
@@ -41,6 +33,8 @@ public partial class FPlayer : MonoBehaviour
public Transform Light;
public Transform BackSpine;
private void Awake()
{
PlayerAnimatorCtrl = gameObject.GetComponent<PlayerAnimator>();
@@ -78,14 +72,9 @@ public partial class FPlayer : MonoBehaviour
if (data.PlayerID == GameModel.RoleID)
{
// var mainSync = gameObject.AddComponent<FPlayerMainSync>();
BaseCamera.Main.transform.SetParent(CameraRoot);
BaseCamera.Main.transform.localPosition = Vector3.zero;
}
else
{
// var otherSync = gameObject.AddComponent<FPlayerOtherSync>();
}
}
#region
@@ -159,7 +148,6 @@ public partial class FPlayer : MonoBehaviour
{
if (Light)
{
Light.localRotation = BaseCamera.Main.transform.localRotation;
if (Light.gameObject.activeSelf != Data.openLight)
{
Light.gameObject.SetActive(Data.openLight);