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

ControllerRef Class

Extends MonoBehaviour, IController, IActiveState
ControllerRef is a utility component that delegates all of its IController implementation to the provided Controller object.

Fields

Handedness Handedness[Get]
bool IsConnected[Get]
bool IsPoseValid[Get]
ControllerInput ControllerInput[Get]
bool Active[Get]
float Scale[Get]

Properties

Action WhenUpdated

Protected Functions

virtual void Awake ( )
virtual void Start ( )

Member Functions

Attempts to retrieve the pose of the controller in world space.
The exact relationship of the retrieved pose to the physical position of the controller can vary by platform, but it typically corresponds to the root transform of the intended visual affordance for the physical controller being tracked.
Parameters
pose
A void world space pose for the controller if available, identity otherwise
Returns
True if the pose argument was populated with a valid pose, false otherwise
Attempts to return a valid "pointer pose" for the controller.
A "pointer pose" is a world-space pose (position and orientation) intended to be used as a directional input, conceptually comparable to "pointing at something." Typically, individual controllers provide their own "pointer pose" based on the ergonomics of the device; this method provides a unified way to query for this.
Parameters
pose
A valid world-space pointer pose if one could be calculated, identity otherwise
Returns
True if the pose argument was populated with a valid pointer pose, false otherwise
Batch query method for determining whether any within a set of buttons (characterized by a bit mask of ControllerButtonUsage) is currently active.
Parameters
buttonUsage
The bit mask indicating which buttons are part of the query
Returns
True if any of the queried buttons are active, false otherwise
Batch query method for determining whether all of a set of buttons (characterized by a bit mask of ControllerButtonUsage) are currently active.
Parameters
buttonUsage
The bit mask indicating which buttons are part of the query
Returns
True if all of the queried buttons are active, false otherwise
void InjectAllControllerRef
( IController controller )
void InjectController
( IController controller )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon