Class YVRInputModule
Override PointerInputModule to allow UI to interact with custom ray
Inheritance
Inherited Members
Namespace: YVR.Core
Assembly: YVR.Core.Runtime.dll
Syntax
public class YVRInputModule : PointerInputModule
Fields
| Name | Description |
|---|---|
| customProvider | Customized input data provider |
| disableModuleOnFocusLost | Disable YVRInputModule when losing focus |
| dragAngleThreshold | Minimum drag threshold in degree |
| enableHMDRayAgent | Whether use HMD as ray transform when both controller is disconnected |
Properties
| Name | Description |
|---|---|
| Instance | Get Instance of YVRInputModule |
| eventData | The event data set from input module to event system |
| inputDataProvider | Current using input data provider |
| inputDataProviderSource | current using input data provider source |
| rayTransform | Transform that decide ray's origin and direction |
| raycastGameObject | The ray casting game object of this frame |
| raycastResult | The raycast result of this frame |
Methods
| Name | Description |
|---|---|
| GetFirstRaycast(Vector3, Vector3, Vector2, List<RaycastResult>) | Use event system to get first raycast result |
| GetSimulatedButtonState() | Get the simulate button state (press / released or not) in this frame |
| GetSimulatedMouseState() | Get the simulated mouse state which override the default mouse state required by PointerInputModule |
| OnDestroy() | Override PointerInputModule to allow UI to interact with custom ray |
| Process() | Override PointerInputModule.Process to handle custom input events |
| ProcessDrag(MouseButtonEventData) | Process the simulated mouse drag state |
| ProcessMousePress(MouseButtonEventData) | Process the simulated mouse button press state |
| ProcessMouseState(MouseState) | Process the simulated mouse state |
| ProcessMove(PointerEventData) | Process the simulated mouse move state |
| ProcessScroll(MouseButtonEventData) | Process the simulated mouse scroll state |
| SetInputDataProvider(DataProviderSource) | Set the currently used data provider |
| Start() | Override PointerInputModule to allow UI to interact with custom ray |
Events
| Name | Description |
|---|---|
| onInputDataProviderChanged | Callback when module input changed |
| onRaycastHit | Callback when raycast hit sth |