- Home /
Clickable sphere?
Ok so I've justs started on a "Ball hitting game." I need a script that when I click on a ball it disappears. Can anyone help me?
No one is going to just write a script for you. You need to post some code with what you have tried. What you are trying to accomplish is pretty easy. You should be able to go through the documentation and at least get part of the way there.
I can just give you a hint You have to cast a ray from you mouse position and if it collides with sphere just destroy it. Raycast help available here
Or you could just add an On$$anonymous$$ouseDown function to it.
Answer by hirenkacha · Feb 15, 2014 at 11:26 AM
Do some google search on it. I have already answered this type of question earlier. Have a look here.
Your answer
Follow this Question
Related Questions
Rolling sphere "foot" on ground? 2 Answers
Ball Doesn't Roll Down Hill - Physics Problem 3 Answers
Rotating camera around the sphere 2 Answers
Simulating the graphics of a rolling 3D ball in a 2D game 2 Answers
How to make Sphere to jump? 2 Answers