Mouse Click Dead Zone at Center of Camera View

I’ve made a series of buttons (objects with functions triggered through OnMouseDown which exist in the scene) for my game which are oriented at the center of the screen. This is a strange place for buttons, but the game takes place around the edges. I’ve noticed that all of the buttons work fine unless they are oriented at the center of the screen, as defined by the camera. Any button within a small radius from center screen does not respond to OnMouseDown. Move the button anywhere else and it works. Move the camera to where the center is different and whatever button falls under the new center will stop working.

I should expand this explanation to include that I am using Unity 3.5.1 on Win7 64-bit, and that OnMouseOver also doesn’t work in the dead zone, which is how I first noticed it.

Really, this is just so weird that I can’t reasonably expect a solution (though I’d be thrilled if there was one since this is such a nasty break in my game design), I’m just curious as to whether anyone else has experienced this.

Going to go redesign my button layout now. Good buy, two days of work!

UPDATE : I saved my layout! Apparently this only happens when the clickable object is greater than 40 units from the camera. I wont even question that, I’m just happy it works now.

UPDATE : I was unable to reproduce this effect in a newly made project, so I’m assuming that it was some strange combination of the way I did things in the previous one which caused the issue. A further reminder that making games is the most challenging game of them all!

-BroB

OnMouseDown does a Raycast for you automaticaly. The only thing I can think of is maybe you’re using a character controller that interferes with it? From the docs:

Note: This function will return false if you cast a ray from inside a sphere to the outside; this in an intended behaviour.

I have been having similar experiences with a dead zones using an OnMouseDown function. Could not find anything in the way, and tried moving the camera and object around…ended up just manually raycasting instead. I have an inkling of a suspicion that there is a real problem going on. No idea.