- Home /
why the unity3d's OnMouseDown method lose efficacy sometime?
I create a cube with box collider component and a script.I write an OnMouseDown method in the script.but when i click the object,sometime the OnMouseDown method is not called.when i change the camera angle and click the object again,sometime the OnMouseDown method is called.I really don't know why it works or not.So i need help.
Hehe, I like your link to "not.so", which actually seems to be a useful site (except that the webpage designer created several incorrect links). :o)
We would need to see your On$$anonymous$$ouseDown script. Also, you can start by adding a Debug.Log line at the very beginning of your On$$anonymous$$ouseDown script to see whether it really isn't executed on every click - or whether the problem must lie somewhere else in your game logic.
Your answer
Follow this Question
Related Questions
How to click from specyfic distance? 2 Answers
OnMouseOver on LateUpdate 1 Answer
Rotate object about x-axis with mouse like in editor 1 Answer
Click On Objects Within Scene 2 Answers
OnMouseDown for right mouse click without being hacky? 1 Answer