The Grip
property represents the grip input on a VR controller. It is an instance of Sandbox.VR.AnalogInput
, which provides the current state of the grip input, typically ranging from 0.0 (not pressed) to 1.0 (fully pressed).
The Grip
property represents the grip input on a VR controller. It is an instance of Sandbox.VR.AnalogInput
, which provides the current state of the grip input, typically ranging from 0.0 (not pressed) to 1.0 (fully pressed).
To access the grip input of a VR controller, you can use the Grip
property. This property is useful for detecting how much pressure is being applied to the grip button on the controller, which can be used to trigger actions or modify behavior in a VR application.
// Example of accessing the Grip property VRController controller = new VRController(); float gripValue = controller.Grip.Value; // Check if the grip is fully pressed if (gripValue >= 1.0f) { // Perform an action when the grip is fully pressed PerformGripAction(); }