New MixedRealityInteractionMapping(1, "Trigger Position", AxisType.SingleAxis, DeviceInputType.Trigger, ControllerMappingLibrary.AXIS_9), New MixedRealityInteractionMapping(0, "Spatial Pointer", AxisType.SixDof, DeviceInputType.SpatialPointer, MixedRealityInputAction.None), public override MixedRealityInteractionMapping DefaultLeftHandedInteractions => new The following example is abbreviated from the GenericOpenVRController class, located in the MixedRealityToolkit.Providers\OpenVR folder. For devices that receive their data via Unity's Input class, the controller mapping tool is a helpful resource to confirm the correct axis and button mappings to assign to interactions. The next step is to define the set of interaction mappings supported by the controller. "StandardAssets/Textures/MotionController")] SupportedControllerType.WindowsMixedReality, (ex: articulated hand), the handedness (ex: left or right) and an optional controller image. This attribute specifies the type of controller Next, apply the MixedRealit圜ontroller attribute to the class. Apply the MixedRealit圜ontroller attribute Not all device managers will support multiple controller types. Once the class has been defined, the next step is to provide the implementation of the IMixedRealityDataProvider Implement the IMixedRealityDataProvider methods Public class WindowsMixedRealityDeviceManager : This step enables setting the default profile and platform(s) for the provider, when selected in the input system profile. Apply the MixedRealityDataProvider attributeĪ key step of creating an input system data provider is to apply the MixedRealityDataProviderĪttribute to the class. Gaze-gesture-voice hands and motion controllers. IMixedRealit圜apabilit圜heck is used by the WindowsMixedRealityDeviceManager to indicate that it provides support for a set of input capabilities, specifically articulated hands, ![]() public class WindowsMixedRealityDeviceManager : The BaseInputDeviceManager and UnityJoystickManager classes provide the required IMixedRealityInputDeviceManager implementation. Where ContosoInput contains the implementation of the data provider, the Editor folder contains the inspector (and any other Unity editor specific code), the Textures folderĬontains images of the supported controllers, and Profiles contains one or more pre-made profiles. It is recommended that the source code for data providers be layed out in a folder hierarchy as shown in the following image. It is recommended that the namespace includes the following components.įor example, an input data provider created by the Contoso company may be "". Namespaceĭata providers are required to have a namespace to mitigate potential name collisions. Located in a folder beneath MixedRealityToolkit.Providers (ex: MixedRealityToolkit.Providers\WindowsMixedReality). Namespace must begin with (ex: ) and the code should be If an input system data provider is being submitted to the Mixed Reality Toolkit repository, the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |