According to the documentation of Unity, I should use Axis1D.SecondaryIndexTrigger
to be able to detect if the user pushes the joystick's trigger identified by the number 7 (on the image of the HTC Vive and in the table describing the inputs, both are displayed in the above link).
However, when I type if(Input.GetAxis(Axis1D.SecondaryIndexTrigger))
, the compiler says :
error CS0103: The name `Axis1D' does not exist in the current context
Axis1D
seems to be necessarily imported or somewhat to be usable.
How could I do this ?
For Htc Vive you need to import following SteamVR Plugin from the unity assetstore
For step by step visit getting started guide here for setting up Htc vive