Class ControllerFinder
ControllerFinder is a base class providing simple event handling for getting/releasing MotionController Transforms.
Implements
Namespace: Microsoft.MixedReality.Toolkit.Utilities.Solvers
Assembly: cs.temp.dll.dll
Syntax
public abstract class ControllerFinder : MonoBehaviour, IMixedRealitySourceStateHandler
Fields
ControllerTransform
The Transform of the currently found controller.
Declaration
protected Transform ControllerTransform
Field Value
Type | Description |
---|---|
Transform |
Properties
Handedness
The handedness of the controller that should be found.
Declaration
public Handedness Handedness { get; set; }
Property Value
Type | Description |
---|---|
Handedness |
Methods
AddControllerTransform(IMixedRealityController)
Starts to track the passed in controller's transform, assuming it meets the previously set handedness criteria.
Declaration
protected virtual void AddControllerTransform(IMixedRealityController newController)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityController | newController | The new controller to be tracked. |
OnControllerFound()
Override this method to act when the correct controller is actually found. This provides similar functionality to overriding AddControllerTransform, without the overhead of needing to check that handedness matches.
Declaration
protected virtual void OnControllerFound()
OnControllerLost()
Override this method to act when the correct controller is actually lost. This provides similar functionality to overriding AddControllerTransform, without the overhead of needing to check that handedness matches.
Declaration
protected virtual void OnControllerLost()
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
OnSourceDetected(SourceStateEventData)
Declaration
public void OnSourceDetected(SourceStateEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
SourceStateEventData | eventData |
OnSourceLost(SourceStateEventData)
Declaration
public void OnSourceLost(SourceStateEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
SourceStateEventData | eventData |
RefreshControllerTransform()
Remove whichever controller is currently tracked, if any, and try to add a new one based on existing sources.
Declaration
protected virtual void RefreshControllerTransform()
RemoveControllerTransform()
Remove whichever controller is currently tracked, if any.
Declaration
protected virtual void RemoveControllerTransform()
TryAndAddControllerTransform()
Looks to see if the controller model already exists and registers it if so.
Declaration
protected virtual void TryAndAddControllerTransform()