Version: 2020.2

CommonUsages

class in UnityEngine.XR

切换到手册

描述

定义用于从 XR.InputDevice.TryGetFeatureValue 中获取输入功能的静态变量。

使用这些静态变量可按使用情况获取 XR.InputDevice 的常用功能值。

静态变量

batteryLevel表示设备的当前电池续航时间的值。
centerEyeAcceleration设备眼睛中心的加速度。
centerEyeAngularAcceleration设备眼睛中心的角加速度,采用欧拉角的格式。
centerEyeAngularVelocity设备眼睛中心的角速度,采用欧拉角的格式。
centerEyePosition设备眼睛中心的位置。
centerEyeRotation设备眼睛中心的旋转。
centerEyeVelocity设备眼睛中心的速度。
colorCameraAcceleration设备彩色摄像机的加速度。
colorCameraAngularAcceleration设备彩色摄像机的角加速度,采用欧拉角的格式。
colorCameraAngularVelocity设备彩色摄像机的角速度,采用欧拉角的格式。
colorCameraPosition设备彩色摄像机的位置。
colorCameraRotation设备彩色摄像机的旋转。
colorCameraVelocity设备彩色摄像机的速度。
deviceAcceleration设备的加速度。
deviceAngularAcceleration设备的角加速度,采用欧拉角的格式。
deviceAngularVelocity设备的角速度,采用欧拉角的格式。
devicePosition设备的位置。
deviceRotation设备的旋转。
deviceVelocity设备的速度。
eyesData包含从设备中收集的眼睛跟踪数据的眼睛结构。
grip表示控制器上的用户手柄。
gripButton表示设备是否被握住的二进制测量值。
handData表示设备的手柄数据的值。
isTracked告知开发人员当前是否在跟踪设备。
leftEyeAcceleration设备左眼的加速度。
leftEyeAngularAcceleration设备左眼的角加速度,采用欧拉角的格式。
leftEyeAngularVelocity设备左眼的角速度,采用欧拉角的格式。
leftEyePosition设备左眼的位置。
leftEyeRotation设备左眼的旋转。
leftEyeVelocity设备左眼的速度。
menuButton表示菜单按钮,用于暂停、返回或退出游戏。
primary2DAxis设备上的主触控板或游戏杆。
primary2DAxisClick表示被单击或按下的主 2D 轴。
primary2DAxisTouch表示被触摸的主 2D 轴。
primaryButton在设备上被按下的主要面按钮或唯一按钮(如果只有一个按钮可用)。
primaryTouch设备上被触摸的主要面按钮。
rightEyeAcceleration设备右眼的加速度。
rightEyeAngularAcceleration设备右眼的角加速度,采用欧拉角的格式。
rightEyeAngularVelocity设备右眼的角速度,采用欧拉角的格式。
rightEyePosition设备右眼的位置。
rightEyeRotation设备右眼的旋转。
rightEyeVelocity设备右眼的速度。
secondary2DAxis设备上的辅助触控板或游戏杆。
secondary2DAxisClick表示被单击或按下的辅助 2D 轴。
secondary2DAxisTouch表示被触摸的辅助 2D 轴。
secondaryButton设备上被按下的辅助面按钮。
secondaryTouch设备上被触摸的辅助面按钮。
trackingState表示正为此设备跟踪的值。
trigger触发式控制,用食指按下。
triggerButton表示食指是否正在激活触发器的二进制测量值。
userPresenceUse this property to test whether the user is currently wearing and/or interacting with the XR device. The exact behavior of this property varies with each type of device: some devices have a sensor specifically to detect user proximity, however you can reasonably infer that a user is present with the device when the property is UserPresenceState.Present.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961