1

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 ?

JarsOfJam-Scheduler
  • 2,809
  • 3
  • 31
  • 70

1 Answers1

0

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

Omar Dhanish
  • 885
  • 7
  • 18
  • Oculus or HTC Vive Integration (I use the latter)? – JarsOfJam-Scheduler Dec 07 '17 at 21:59
  • For htc vive controllers or Oculus controllers you can use SteamVr plugin , I have updated the answer .. For the input Scripts , visit the updated getting started link , information there is pretty clear . To my knowledge "Axis1D.SecondaryIndexTrigger" you used is for oculus touch controllers. – Omar Dhanish Dec 08 '17 at 04:46
  • `Axis1D...` is normally supposed to be used for both headsets, to abstract them - according to the doc I linked. – JarsOfJam-Scheduler Dec 08 '17 at 10:16