Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Raycast Not Casting Java Script

$
0
0
var FirstPlot: GameObject; if ( Input.GetMouseButtonDown (0)){ var hit: RaycastHit; var ray: Ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, hit)) { if(hit.collider.tag=="Respawn") { Destroy(FirstPlot); } } } Whats wrong, no errors are given out and yet the Cube isn't being destroyed? Thanks

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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