Autowalk以相反的方向统一

时间:2015-04-27 10:25:32

标签: unity3d google-cardboard

https://github.com/JuppOtto/Google-Cardboard/blob/master/Autowalk.cs

朝着相反的方向前进,有时候会走向正确的方向。?

帮我解决问题,以便朝着正确的方向前进

以下是涉及的代码:

CharacterController controller = GetComponent<CharacterController>(); 
moveDirection = transform.TransformDirection(Camera.main.GetComponent<StereoController>().Head.c‌​amera.transform.position);
if (controller.isGrounded)
{ 
    moveDirection *= speed; 
} 
controller.Move(moveDirectionspeed * Time.deltaTime);

运动始终是相反的方向。

现在我已经厌倦了向负方向增加速度,现在它的前移但是从左侧拉开我无能为力。

0 个答案:

没有答案
相关问题