public sealed class Sandbox.VR.VRController : Sandbox.VR.TrackedObject
Represents a VR controller, along with its transform, velocity, and inputs.
Methods
Showing 11 methods
public virtual override Sandbox.VR.VRController <Clone>$()
public float GetFingerCurl(int index)
Get the skeletal value (from 0 to 1) of a specified finger curl index.
public float GetFingerSplay(int index)
Get the skeletal value (from 0 to 1) of a specified finger splay index.
public float GetFingerValue(Sandbox.VR.FingerValue value)
Get the skeletal value (from 0 to 1) of a specified `Sandbox.VR.FingerValue` - includes curl and splay.
public System.Collections.Generic.List`1<Sandbox.VR.VRHandJointData> GetJointData()Obsolete
Obsolete: Please use GetJoints()
public Sandbox.VR.VRHandJointData[] GetJoints(Sandbox.VR.MotionRange motionRange = 0)
Returns joint data for a specific motion range.
Parameters
motionRange: Whether the joints returned represent a raw hand pose, or one that represents the hand wrapping around the controller. Default: 0
public Sandbox.Model GetModel()
Retrieves or creates a cached model that can be used to render this controller.
public void StopAllHaptics()
Stops all rumble and haptic events on this controller.
public void StopAllVibrations()
Stop all vibration events on this controller.
public void TriggerHaptics(Sandbox.HapticEffect effect, float lengthScale = 1, float frequencyScale = 1, float amplitudeScale = 1)
Trigger a vibration based on a predefined `Sandbox.HapticPattern`. All `Sandbox.HapticPattern`s are normalized (start at 0, peak at 1).
Parameters
effect: The pattern to uselengthScale: The amount to scale the pattern's length by. Default: 1frequencyScale: The amount to scale the pattern's frequency by. Default: 1amplitudeScale: The amount to scale the pattern's amplitude by. Default: 1
public void TriggerHapticVibration(float duration, float frequency, float amplitude)Obsolete
Triggers a haptic vibration event on the controller for this hand.
Obsolete: Use TriggerHaptics instead
Note
If a haptic event is already running it will be interrupted immediately.
Parameters
duration: How long the haptic action should last (in seconds - can be 0 to "pulse" it)frequency: How often the haptic motor should bounce (0 - 320 in hz. The lower end being more useful)amplitude: How intense the haptic should be (0 - 1)
No results match this filter.
Properties
Showing 9 properties
public virtual Transform Sandbox.VR.VRController.AimTransform { get; set; }
The aim pose transform in world space (pointing forward).
public Sandbox.VR.DigitalInput Sandbox.VR.VRController.ButtonA { get; set; }
The primary button on this controller (Usually A, can be X for Oculus Touch)
public Sandbox.VR.DigitalInput Sandbox.VR.VRController.ButtonB { get; set; }
The secondary button on this controller (Usually B, can be Y for Oculus Touch)
public Sandbox.VR.AnalogInput Sandbox.VR.VRController.Grip { get; set; }
The grip input on this controller
public bool Sandbox.VR.VRController.IsHandTracked { get; set; }
Is this controller currently being represented using full hand tracking?
public Sandbox.VR.AnalogInput2D Sandbox.VR.VRController.Joystick { get; set; }
The primary joystick input on this controller
public Sandbox.VR.DigitalInput Sandbox.VR.VRController.JoystickPress { get; set; }
The primary joystick press on this controller
public virtual Transform Sandbox.VR.VRController.Transform { get; set; }
The grip pose transform in world space (centered on palm/grip).
public Sandbox.VR.AnalogInput Sandbox.VR.VRController.Trigger { get; set; }
The trigger input on this controller
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox.VR |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.VR.VRController |