Question by
yunjenwang · Aug 15, 2017 at 02:08 PM ·
vrraycastingraycasthit
how to stop raycast?
Hi, I have a raycast event. The raycast is hit from camera with VR gaze pointer. How can I make raycast stop hitting after hit the target object? I did a stupid method. After hitting the "correctAnswer's tag object"(CorrectAnswerspeak_cube) and make it false. But I dont know how to let "CorrectAnswerspeak_cube" setActive.true again?
if(hit.transform.tag == "correctAnswer")
{
CorrectAnswerspeak_cube.SetActive(false);
CorrectAnswer_speak.GetComponent<CorrectAnswerspeak>().answerspeaking();
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612132750im_/https://answers.unity.com/themes/thub/images/avi.jpg)