Quantcast
Channel: Answers for "Something like OnTriggerExit for Raycasts?"
Browsing latest articles
Browse All 4 View Live

Answer by Tekksin

I don't work with raycasts because they're taxing, but do you have an else statement following the if? IE: if(raycasthit){ change color; } else{ return color; } the process to return the color should...

View Article


Answer by V-Jankaitis

void Hit_Target() // put this in update function { Ray ray = Cam.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit)) { if (hit.collider.gameObject.GetComponent() != null) // If...

View Article

Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>