I have got big issue with SteamInteraction system,
I want to get x value of a Trigger Cotnroller,
using Valve.VR.InteractionSystem;
public class handGrabVive : MonoBehaviour {
public GameObject HandParent;
Hand hand;
float grabb;
Animator anim;
bool X=false;
public Transform rotationPoint;
float timer=0.5f;
public GameObject playercol;
// Use this for initialization
void Start () {
playercol = GameObject.FindGameObjectWithTag ("playercol");
hand = HandParent.GetComponent<Hand>();
anim = GetComponent<Animator>();
rotationPoint = GameObject.FindGameObjectWithTag ("MainCamera").transform;
}
// Update is called once per frame
void Update () {
hand = HandParent.GetComponent<Hand> ();
grabb = hand.controller.GetAxis (Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger).x;
Iam getting null refference all the time,even if it has the object with “Hand” script