Represents a VR controller. Provides functionality for spacial tracking and haptic feedback. Can also be used to represent hardware trackers, game controllers or other references. More...
Public Member Functions | |||||
HapticCapabilities | GetHapticCapabilities () | ||||
Returns the haptic capabilites of this controller. More... | |||||
void | HapticPulse (float amplitude, float duration) | ||||
Performs a haptic pulse on this controller (if available)
| |||||
Public Member Functions inherited from AVR.Core.AVR_Behaviour | |||||
virtual void | OnDestroy () | ||||
Protected Member Functions | |
override void | Awake () |
Protected Member Functions inherited from AVR.Core.AVR_GenericXRDevice | |
override void | Awake () |
void | UpdateTracking () |
Updates the controller position and rotation. More... | |
void | OnBeforeRender () |
void | Update () |
override void | OnEnable () |
override void | OnDisable () |
Protected Member Functions inherited from AVR.Core.AVR_Component | |
virtual void | Start () |
Properties | |
static AVR_Controller | leftHandController [get, set] |
Returns the AVR_Controller that represents the left hand controller (if it exists). This value depends on the controllerNode value and is not updated if this one is changed during runtime. More... | |
static AVR_Controller | rightHandController [get, set] |
Returns the AVR_Controller that represents the right hand controller (if it exists). This value depends on the controllerNode value and is not updated if this one is changed during runtime. More... | |
AVR_ControllerInputManager | inputManager [get] |
the AVR_ControllerInputManager assigned to this controller. Returns null if no inputmanager is assigned More... | |
Private Attributes | |
AVR_ControllerInputManager | _inputManager =null |
Additional Inherited Members | |
Public Types inherited from AVR.Core.AVR_GenericXRDevice | |
enum | TrackingUpdateType { TrackingUpdateType.OnUpdate, TrackingUpdateType.OnBeforeRender, TrackingUpdateType.OnBeforeRenderAndUpdate } |
Defines when positional tracking should take place. Recommended setting is OnBeforeRenderAndUpdate More... | |
Static Public Member Functions inherited from AVR.Core.AVR_GenericXRDevice | |
static AVR_GenericXRDevice | getDeviceAtNode (XRNode node) |
Returns the last AVR_GenericXRDevice enabled that has a given controllerNode value. More... | |
Public Attributes inherited from AVR.Core.AVR_GenericXRDevice | |
XRNode | controllerNode |
Which XRNode this object represents. More... | |
InputDevice | inputDevice => _inputDevice.isValid ? _inputDevice : _inputDevice = InputDevices.GetDeviceAtXRNode(controllerNode) |
XR.Inputdevice that this controller represents. More... | |
bool | tracking = true |
Defines if spatial tracking should be performed. More... | |
TrackingUpdateType | updateType |
Defines when positional tracking should take place. Recommended setting is OnBeforeRenderAndUpdate More... | |
bool | smoothing = false |
Defines if positional tracking is smoothed across several frames. Makes controllers less shaky. More... | |
float | smoothingFidelity = 0.3f |
Defines the amount of smoothing. More... | |
Public Attributes inherited from AVR.Core.AVR_Component | |
UnityEngine.Events.UnityEvent | onAwake |
Events called when this component awakes. More... | |
UnityEngine.Events.UnityEvent | onStart |
Events called when this component starts. More... | |
UnityEngine.Events.UnityEvent | onEnable |
Events called when this component is enabled. More... | |
UnityEngine.Events.UnityEvent | onDisable |
Events called when this component is disabled. More... | |
Protected Attributes inherited from AVR.Core.AVR_Behaviour | |
AVR_PlayerRig | playerRig => AVR_PlayerRig.Instance |
The current AVR_PlayerRig instance in the scene More... | |
AVR_Root | root => AVR_Root.Instance |
The current AVR_Root instance in the scene More... | |
bool | vrEnabled => UnityEngine.XR.XRSettings.enabled |
True if the application is running as a VR/XR application More... | |
Static Protected Attributes inherited from AVR.Core.AVR_GenericXRDevice | |
static Dictionary< XRNode, AVR_GenericXRDevice > | nodeDevices = new Dictionary<XRNode, AVR_GenericXRDevice>() |
Represents a VR controller. Provides functionality for spacial tracking and haptic feedback. Can also be used to represent hardware trackers, game controllers or other references.
Definition at line 12 of file AVR_Controller.cs.