修改摄像机闪现问题
This commit is contained in:
parent
370a33fcd8
commit
b603c6a2cf
@ -74,7 +74,12 @@ namespace KinematicCharacterController.Examples
|
||||
|
||||
PlanarDirection = Vector3.forward;
|
||||
}
|
||||
public void ResetTR(Vector3 rotDefault)
|
||||
{
|
||||
_targetVerticalAngle = rotDefault.x;
|
||||
|
||||
PlanarDirection = FollowTransform.forward;
|
||||
}
|
||||
// Set the transform that the camera will orbit around
|
||||
public void SetFollowTransform(Transform t)
|
||||
{
|
||||
|
||||
@ -630,6 +630,7 @@ namespace ZXK.LouDiXvMuNiu
|
||||
kinematic.SetPositionAndRotation(pos, Quaternion.Euler(0, rot.y, 0));///设置相机旋转,位置
|
||||
characterCamera.transform.rotation = Quaternion.Euler(rot.x, rot.y, 0);
|
||||
characterCamera.transform.position = characterCamera.pos.transform.position;
|
||||
characterCamera.ResetTR(rot);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user