I have followed this tutorial and filled in some basic code to check if it is working. I so far have this
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
public class gun : MonoBehaviour
{
public SteamVR_Action_Boolean Shoot;
public GameObject pistol;
public SteamVR_Input_Sources handType;
// Start is called before the first frame update
void Start()
{
Shoot.AddOnStateDownListener(TriggerDown, handType);
Shoot.AddOnStateUpListener(TriggerUp, handType);
Debug.Log("start");
}
// Update is called once per frame
void Update()
{
}
public void TriggerDown(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource)
{
Debug.Log("Trigger is down");
}
public void TriggerUp(SteamVR_Action_Boolean fromAction, SteamVR_Input_Sources fromSource)
{
Debug.Log("Trigger is up");
}
}
However, I cannot get a response from any button presses. I have double checked my controller is working so I figure it has to be my code breaking. Just to be safe here’s this as well.(also this is like my third time submitting this question because I’m having issues with the website)


