修改arm
This commit is contained in:
@@ -48,12 +48,11 @@ namespace NBF
|
||||
{
|
||||
_cameraAsset.fppVCam.LookAt = player.FppLook;
|
||||
_cameraAsset.fppVCam.Follow = player.ModelAsset.NeckTransform;
|
||||
player.ModelAsset.LookIk.solver.target = player.FppLook;
|
||||
}
|
||||
|
||||
_cameraAsset.fppVCam.Priority = 10;
|
||||
_cameraAsset.tppVCam.Priority = 0;
|
||||
StartCoroutine(SnapToTarget());
|
||||
// StartCoroutine(SnapToTarget());
|
||||
}
|
||||
|
||||
public void SetFppLook(Transform fppCamLook)
|
||||
@@ -65,22 +64,6 @@ namespace NBF
|
||||
{
|
||||
_cameraAsset.fppVCam.Follow = fppCamFollow;
|
||||
}
|
||||
|
||||
IEnumerator SnapToTarget()
|
||||
{
|
||||
// 等 Cinemachine 先激活并跑一帧
|
||||
yield return null;
|
||||
Transform follow = _cameraAsset.fppVCam.Follow;
|
||||
|
||||
_cameraAsset.fppVCam.OnTargetObjectWarped(
|
||||
follow,
|
||||
follow.position - _cameraAsset.fppVCam.transform.position
|
||||
);
|
||||
|
||||
// _cameraAsset.fppVCam.OnTargetObjectWarped(
|
||||
// FPlayer.Instance.ModelAsset.NeckTransform,
|
||||
// FPlayer.Instance.ModelAsset.NeckTransform.position - _cameraAsset.fppVCam.transform.position
|
||||
// );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -185,6 +185,7 @@ namespace NBF
|
||||
var actionName = context.action.name;
|
||||
if (actionName == "Op1")
|
||||
{
|
||||
IsOp1 = true;
|
||||
OnOp1Action?.Invoke(true);
|
||||
}
|
||||
else if (actionName == "Op2")
|
||||
@@ -201,6 +202,7 @@ namespace NBF
|
||||
var actionName = context.action.name;
|
||||
if (actionName == "Op1")
|
||||
{
|
||||
IsOp1 = false;
|
||||
OnOp1Action?.Invoke(false);
|
||||
}
|
||||
else if (actionName == "Op2")
|
||||
|
||||
Reference in New Issue
Block a user