当前位置:网站首页>Preliminary controller input of oculus learning notes (1)

Preliminary controller input of oculus learning notes (1)

2022-06-22 18:29:00 Tomato ape

Oculus We can control the input of the handle from OVRInput In this static class ,OVRInput Enumeration types with multiple buttons in , We can quickly find the corresponding input control by enumerating values .
OVRInput There are mainly the following categories :
1. Controller Controller enumeration , Supported input devices :
• LTouch:Oculus Left of Touch controller , It's virtual so that Touch distinguish
• RTouch:Oculus The right side of Touch controller
• Touch: Oculus The controller , Including left and right Touch controller
• Remote: Oculus Of Remote controller ( Small remote control )
• Gamepad: Include Xbox 360、Xbox one, Or an ordinary Android handle
• Touchpad: GearVR Of TouchPad( Android )
• Active:
• All
2. Button Input of each button , Corresponding Oculus Of Touch The buttons mainly include :
• One: Corresponding A key
• Two: Corresponding B key
• Three: Corresponding C key
• Four: Corresponding D key
• Start: Corresponding to the start key of the left hand handle
• Back: No corresponding
• PrimaryShoulder: No corresponding
• PrimaryIndexTrigger: The index finger button corresponding to the left hand handle
• PrimaryHandTrigger : It corresponds to the middle finger of the left hand handle 、 Ring finger button
• PrimaryThumbstick: The button corresponding to the left hand handle rocker ( The rocker can be pressed )
• PrimaryThumbstickUp: Push the rocker of the left hand handle upward
• PrimaryThumbstickDown: Push down the rocker of the left hand handle
• PrimaryThumbstickLeft: Push the left handle rocker to the left
• PrimaryThumbstickRight: Push the left hand handle rocker to the right
• SecondaryShoulder: Right hand handle , Same as left hand
……
3. RawButton What I understand is native buttons , But I don't quite understand and Button What's the difference? , Because the buttons are basically the same , Comments are written that can be used to directly query the state of the controller
4. Touch Mainly Touch Various touch inputs , Note that touch input is included in the press operation , in other words , When the button is pressed , Touch events are still being triggered , The corresponding relationship is basically the same as Button:
• One:
• Two
• Three
• Four
• PrimaryIndexTrigger
• PrimaryThumbstick
• PrimaryThumbRest: This is the lighter circle on the handle , For the thumb rest area , This event is triggered when the finger is placed on it
• Secondary……
5. RawTouch
6. NearTouch Mainly when the finger is close to the button ( No contact ), Included in touch and press , This function has only two buttons on one handle :
• PrimaryIndexTrigger
• PrimaryThumbButtons : Although there is only one , But close to the rocker 、Rest Area 、X、Y Key will be triggered
• SecondaryIndexTrigger
• SecondaryThumbButtons
7. RawNearTouch
8. Axis1D
9. RawAxis1D
10. Axis2D
11. RawAxis2D

in addition OVRInput Is a static class , So it is very convenient to monitor the buttons

if (OVRInput.Get(OVRInput.Button.PrimaryHandTrigger))
{
     Debug.Log("PrimaryHandTrigger");
}
if (OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger))
{
     Debug.Log("PrimaryIndexTrigger");
}

These are my initial learning , There are still many things that have not been understood , We'll continue later , I also look forward to the great God passing by to guide me .

原网站

版权声明
本文为[Tomato ape]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221648387879.html