// Update is called once per frame void Update() { //Debug.Log(Controller.velocity); if (!gameManagerScript.gamePlaying) { if (Physics.Raycast(trackedObj.transform.position, trackedObj.transform.forward, out hit)) { if (Controller.GetHairTriggerDown()) { if (hit.transform.tag == "Play") { gameManagerScript.Play(); Debug.Log("Playing Game"); } else if (hit.transform.tag == "Restart") { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); gameManagerScript.Play(); Debug.Log("Resarting Game"); } else if (hit.transform.tag == "Quit") { Application.Quit(); Debug.Log("Quitting Game"); } } //Instead of a laser it creates a fire particle effect where you point the controller //GameObject fire = Instantiate(fireEffect, hit.point, Quaternion.identity); //Destroy(fire, .5f); //GameObject sparks = Instantiate(sparkEffect, hit.point, Quaternion.LookRotation(hit.normal)); //Destroy(sparks, .5f); hitPoint = hit.point; ShowLaser(hit); } } else { laser.SetActive(false); } }