【发布时间】:2016-08-09 09:39:19
【问题描述】:
仍然在这里学习并从基础开始(只是一个普通的飞机并以第一人称移动) 但是,我可以运行该应用程序并上下左右查看等,但在触摸 GearVR 耳机上的触摸板时无法使相机移动。
我已经创建了脚本(c#)并统一附加到相机上:
using UnityEngine;
using System.Collections;
public class Moving : MonoBehaviour {
// Use this for initialization
void Start()
{
if (Input.GetButton("Tap"))
{
// Do something if tap starts
}
if (Input.GetButtonUp("Tap"))
{
// Do something if tap ends
}
}
// Update is called once per frame
void Update () {
if (Input.GetButton("Tap"))
{
// Do something if tap starts
}
if (Input.GetButtonUp("Tap"))
{
// Do something if tap ends
}
}
}
但它似乎仍然不起作用。当我构建并运行应用程序时,它什么也不做:-(
我知道我做错了什么,但不确定是什么。
【问题讨论】: