Description
The Active
property of the DigitalInput
struct in the Sandbox.VR
namespace indicates whether the digital input action is currently accessible. If this property is false
, the IsPressed
property will always return false
and will not change, effectively disabling the input action.
Usage
Use the Active
property to check if a digital input action is currently enabled and can be interacted with. This is useful for determining if the input should be processed or ignored in your VR application logic.
Example
// Example of checking if a digital input is active
DigitalInput input = new DigitalInput();
if (input.Active)
{
// The input is active, check if it is pressed
if (input.IsPressed)
{
// Handle the input being pressed
}
}
else
{
// The input is not active, ignore it
}