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

Controller Class

The Interaction SDK's default concrete implementation of IController.
Instances of this type represent and expose the capabilities of tracked XR controllers in the physical world. Controllers are leveraged in many different ways throughout the Interaction SDK (as IControllers directly, as ISelectors, as sources for RayInteractor.Ray data, etc.) and, along with Hands, is one of the main interaction modalities supported by the SDK.

Fields

Handedness : Handedness
Implementation of IController.Handedness; for details, please refer to the related documentation provided for that interface.
Signature
virtual Handedness Oculus.Interaction.Input.Controller.Handedness
Scale : float
Implementation of IController.Scale; for details, please refer to the related documentation provided for that interface.
Signature
virtual float Oculus.Interaction.Input.Controller.Scale

Properties

ControllerInput : ControllerInput
[Get]
Implementation of IController.ControllerInput; for details, please refer to the related documentation provided for that interface.
Signature
virtual ControllerInput Oculus.Interaction.Input.Controller.ControllerInput
IsConnected : bool
[Get]
Implementation of IController.IsConnected; for details, please refer to the related documentation provided for that interface.
Signature
virtual bool Oculus.Interaction.Input.Controller.IsConnected
IsPointerPoseValid : bool
[Get]
Checks whether a valid "pointer pose" is currently available.
See IController.TryGetPointerPose(out Pose) for details on what a pointer pose is.
Signature
virtual bool Oculus.Interaction.Input.Controller.IsPointerPoseValid
IsPoseValid : bool
[Get]
Implementation of IController.IsPoseValid; for details, please refer to the related documentation provided for that interface.
Signature
virtual bool Oculus.Interaction.Input.Controller.IsPoseValid

Events

WhenUpdated : Action
Implementation of IController.WhenUpdated; for details, please refer to the related documentation provided for that interface.
Signature
virtual Action Oculus.Interaction.Input.Controller.WhenUpdated

Protected Methods

Apply ( data )
Signature
override void Oculus.Interaction.Input.Controller.Apply(ControllerDataAsset data)
Parameters
Returns
override void

Methods

InjectAllController ( updateMode , updateAfter , modifyDataFromSource , applyModifier )
Wrapper for DataModifier<TData>.InjectAllDataModifier(DataSource<TData>.UpdateModeFlags, IDataSource, IDataSource<TData>, bool), for injecting the required dependencies to a dynamically-allocated Controller instance.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Input.Controller.InjectAllController(UpdateModeFlags updateMode, IDataSource updateAfter, IDataSource< ControllerDataAsset > modifyDataFromSource, bool applyModifier)
Parameters
updateMode: UpdateModeFlags
updateAfter: IDataSource
modifyDataFromSource: IDataSource< ControllerDataAsset >
applyModifier: bool
Returns
void
IsButtonUsageAllActive ( buttonUsage )
Implementation of IController.IsButtonUsageAllActive(ControllerButtonUsage); for details, please refer to the related documentation provided for that interface.
Signature
virtual bool Oculus.Interaction.Input.Controller.IsButtonUsageAllActive(ControllerButtonUsage buttonUsage)
Parameters
buttonUsage: ControllerButtonUsage
Returns
bool
IsButtonUsageAnyActive ( buttonUsage )
Implementation of IController.IsButtonUsageAnyActive(ControllerButtonUsage); for details, please refer to the related documentation provided for that interface.
Signature
virtual bool Oculus.Interaction.Input.Controller.IsButtonUsageAnyActive(ControllerButtonUsage buttonUsage)
Parameters
buttonUsage: ControllerButtonUsage
Returns
bool
MarkInputDataRequiresUpdate ()
Overrides and encapsulates DataSource<TData>.MarkInputDataRequiresUpdate, augmenting the behavior of the base type's method by invoking WhenUpdated to notify observers of the occurrence.
Signature
override void Oculus.Interaction.Input.Controller.MarkInputDataRequiresUpdate()
Returns
override void
TryGetPointerPose ( pose )
Implementation of IController.TryGetPointerPose(out Pose); for details, please refer to the related documentation provided for that interface.
Signature
virtual bool Oculus.Interaction.Input.Controller.TryGetPointerPose(out Pose pose)
Parameters
pose: out Pose
Returns
bool
TryGetPose ( pose )
Implementation of IController.TryGetPose(out Pose); for details, please refer to the related documentation provided for that interface.
Signature
virtual bool Oculus.Interaction.Input.Controller.TryGetPose(out Pose pose)
Parameters
pose: out Pose
Returns
bool