- Home /
Image appear when i click on a model
ok...so i know that to get something to happen when you click on an object you have to use "OnMouseDown" i also know that to make something appear on your gui is "OnGUI" and that picture is ShowPicture = true...can someone just write the code...i admit i am a noob at this.
Answer by dorpeleg · Mar 04, 2013 at 04:49 PM
I'm not going to write the entire code for you, but I can guide you in the right direction.
To know if an object is clicked, you will need to use raycast to send a ray from screen point to the object.
In the raycast, you should check if the ray hits the game object.
If it does, then you can set a bool var ShowPicture = true;
Inside OnGUI(), you should check if ShowPicture = true, if it is, then draw a texture.
Your answer
Follow this Question
Related Questions
3D Max model does not appear in play in my project 1 Answer
How to make a game object appear, when another game object is clicked? 1 Answer
3D models from 2D images 1 Answer
Change sprite images on button click 0 Answers
On Gui Object Click 1 Answer