Your app can have multiple game controller devices. The XRNode enumeration defines the following nodes: XR nodeĪ point midway between the pupils of the user’s eyes.Ī console-style game controller. XR nodes represent the physical points of reference in the XR system (for example, the user’s head position, their right and left hands, or a tracking reference such as an Oculus camera). ![]() UnityEngine.XR.InputDevices.GetDevices(inputDevices) ĭebug.Log(string.Format("Device found with name ''", device.name, ())) To get a list of all connected devices, use InputDevices.GetDevices: var inputDevices = new List() Use the XR.InputDevices class to access input devices that are currently connected to the XR system. ![]() For more information on the InputDevice API, see documentation on InputDevice. It can contain information about device tracking, buttons, joysticks, and other input controls. See XR.Input.CommonUsages for a definition of each InputFeatureUsage.Īn InputDevice represents any physical device, such as a controller, mobile phone, or headset. This button is mapped to primaryButton, rather than menuButton, in order to better handle cross-platform applications. (1) Sandwich button refers to the Vive menu button. Legacy input index (left controller/right controller) The following table lists the standard controller InputFeatureUsage names and how they map to the controllers of popular XR systems: You can use InputFeatureUsage to get the trigger state using its name, so you don’t need to set up an axis (or a button on some XR platforms) for the conventional Unity Input system. More info See in Glossary platform you use. Devices supporting these forms of interactive applications can be referred to as XR devices. For example, Unity defines the InputFeatureUsage called trigger as a single-axis input that the index finger controls, regardless of which XR An umbrella term encompassing Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR) applications. ![]() See XR.Input.CommonUsages for a definition of each InputFeatureUsage.Įach InputFeatureUsage corresponds to a common input action or type. These help you identify input types by name. Unity provides a C# struct called InputFeatureUsage, which defines a standard set of physical device controls (such as buttons and triggers) to access user input on any platform. For instance, there are small differences between the Vive and the Oculus Rift, but a VR-enabled desktop platform and a mobile platform like Daydream differ a lot more. However, access to these input features can vary a lot between platforms. Your application can use specific data that references positions, rotations, touch, buttons, joysticks, and finger sensors. XR platforms have a rich variety of input features that you can take advantage of when you design user interactions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |