- Home /
Question by
hussambaradei · Oct 15, 2017 at 03:33 AM ·
javascriptraycastobjectmouseclick
How To Detect MouseClick Using Raycast Java Script
Hello so basically I'm making this game, with several objects being clickable. I want it so that the script doesn't need to be under every single game object, which function Mouse Clicked needs. I found out about Raycast but I'm not sure how to use it. The Object's Name Is First Plot. Any Help Would be nice. I want it that once the object is clicked it's destroyed using raycast rather then Mouse Clicked. Thanks!
-New to unity
Comment
Your answer
Follow this Question
Related Questions
Push object in direction of camera 0 Answers
Raycast Not Casting Java Script 1 Answer
Move object to raycast point. 3 Answers
Mouse clicking on an object (Raycast.hit) for another object to connect to it? 0 Answers
Camera Zoom in&out 2 Answers