我正在尝试创建一个脚本,该脚本将在出于校准原因按下某个键时将 HMD 和控制器位置重置(到特定位置)。我对统一很陌生,所以我所能弄清楚的就是如何获得关键输入。
public class resetPosition : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
Debug.Log("pressed");
}
}