5 Development Guide for Hardware Products¶
This chapter focuses on the usage methods of SDK on different Pico devices, and developers can choose what they need.
5.1 General Introduction of Pico Devices¶
5.1.1 General usage tutorial¶
For XR Interaction Toolkit, please refer to the official tutorial at https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@0.9/manual/index.html
5.1.2 Pico controller introduction¶
1、Enter PicoXR Plugin> Assets> Resources> Prefabs, and place ControllerModel prefab into the scene just as shown below:
Fig 5.1 Location to place controller prefab
2、Use customized controller model
To use customized controller model (e.g. pistol, slingshot, wand, sword etc.), please check this option, or choose not to place the prefab of ControllerModel.
Fig 5.2 Custom controller model option
5.2 Introduction to Pico Neo 3 Input¶
Using keys and Joysticks of the two controllers needs related APIs referenced in Chapter 7. Here are the correspondence XR API parameters for Pico Neo 3 controller buttons:
Fig 5.3 Key mapping diagram (front view)
Fig 5.4 Key mapping diagram (side view)
Buttons | Input event |
---|---|
Menu | CommonUsages.menuButton |
Trigger | CommonUsages.TriggerButton |
Grip | CommonUsages.GripButton |
Joystick | CommonUsages.primary2DAxisClick |
X/A | CommonUsages.primaryButton |
Y/B | CommonUsages.secondaryButton |
5.3 Pico Headsets Buttons¶
The table below clarifies the correspondence of buttons on the headset and KeyCode in Unity.
HMD Buttons | Input Buttons in Unity |
---|---|
Return Button | KeyCode.Escape |
Confirm Button | KeyCode.JoystickButton0 |
Home Button | KeyCode.Home (occupied by the system and not open by default) |
Volume Up Button | Android Standard VOLUME_UP (occupied by the system and not open by default) |
Volume Down Button | Android Standard VOLUME_DOWN (occupied by the system and not open by default) |
Note: Using Keycode. JoystickButton0 is not applicable when using the new Input system. If you still want to use the old input manager to get the headset confirm key value, You will need to check “Both” or “Input Manager(Old)” in Player Settings-> Player-> Other Settings->Active Input Handling* option.
Fig 5.5 Switch between old and new input systems