API reference
API reference
Select your platform
No SDKs available
No versions available

OVRRuntimeController Class

Extends MonoBehaviour
This class connects the behavior of an OVRInput.Controller to a rendered 3D model.
This implementation is highly specialized for and tightly coupled to the 3D model with which it is used in provided prefabs; usage without that model is not supported.

Fields

m_controller : OVRInput.Controller
The OVRInput.Controller that determines whether or not to enable rendering of the controller model.
This value will be passed to OVRInput when reading controller state.
Signature
OVRInput.Controller m_controller
m_controllerModelShader : Shader
Shader that will be used for the controller model.
This is needed in order to correctly initialize the material for the loaded glTF asset.
Signature
Shader m_controllerModelShader
m_supportAnimation : bool
Flag indicating whether the rendered model should or shouldn't be animated.
If true, values from OVRInput.Get(OVRInput.Axis1D, OVRInput.Controller), OVRInput.Get(OVRInput.Axis2D, OVRInput.Controller), etc. will be used to set the animation state of the rendered model, causing its various buttons to move in immitation of their real-world counterparts.
Signature
bool m_supportAnimation

Methods

InputFocusAquired ()
Informs this instance that the associated controller (designated by m_controller) is considered by the app to have input focus, which affects how the controller is displayed.
Signature
void InputFocusAquired()
Returns
void
InputFocusLost ()
Informs this instance that the associated controller (designated by m_controller) is considered by the app to not have input focus, which affects how the controller is displayed.
Signature
void InputFocusLost()
Returns
void