The IsPressed
property of the DigitalInput
struct in the Sandbox.VR
namespace indicates whether the digital input action, such as a button press, is currently active. It returns true
if the input is pressed and false
otherwise.
The IsPressed
property of the DigitalInput
struct in the Sandbox.VR
namespace indicates whether the digital input action, such as a button press, is currently active. It returns true
if the input is pressed and false
otherwise.
Use the IsPressed
property to check the current state of a digital input action. This is useful for determining if a button or similar input is being pressed at the moment of checking.
// Example of using the IsPressed property DigitalInput input = new DigitalInput(); if (input.IsPressed) { // Execute logic when the input is pressed PerformAction(); } void PerformAction() { // Action to perform when the input is pressed }