vrchat第三人称视角怎么调

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vrchat第三人称视角怎么调相关的知识,希望对你有一定的参考价值。

参考技术A

[SerializeField]
private Camera mainCamera, thirdPersonCamera;

bool firstPersonViewOrThirdPersonView = false;
//false为主相机深度更大 , true为第三人称相机深度更大
void Update()

if (Input.GetKeyDown(KeyCode.V))

if (firstPersonViewOrThirdPersonView == false)
firstPersonViewOrThirdPersonView = true;
else
firstPersonViewOrThirdPersonView = false;

if (firstPersonViewOrThirdPersonView == true)

thirdPersonCamera.depth = 1;
mainCamera.depth = 0;

if (firstPersonViewOrThirdPersonView == false)

mainCamera.depth = 1;
thirdPersonCamera.depth = 0;

   


if (Input.GetKey(KeyCode.W))
cc.Move(transform.forward * 7 * Time.deltaTime);


if (Input.GetKey(KeyCode.S))
cc.Move(transform.forward * -7 * Time.deltaTime);


if (Input.GetKey(KeyCode.A))
transform.Rotate(Vector3.up * -3);


if (Input.GetKey(KeyCode.D))
transform.Rotate(Vector3.up * 3);


if (Input.GetKey(KeyCode.LeftShift))
cc.Move(transform.forward * 9 * Time.deltaTime);

以上是关于vrchat第三人称视角怎么调的主要内容,如果未能解决你的问题,请参考以下文章