OnMouseUp() problem

I am using OnMouseUp() inside a script attached to a Game Object and everything works great when I use my main camera. But when I change to my top camera (which shows everything like 2d objects) OnMouseUp() is never invoked. Have you got any idea what is the problem?

The actual problem is that the top camera seems to be too far away from the object. How can I fix it ?

hi, even does not work if you tag your top camera as main camera?

Most probable it is another collider that is blocking, I have noticed that colliders can block even if the object is not active.

@Mig-081 Thanks for the idea but there is no difference at all. @thpetsen What exactly do you mean? And if you are right Why when my camera is closer to the object everything works. Actually when the distance between the camera and the object is less than 3 it works.

Well, that still sounds like a collider, and from your description, it is probably 3 units above your target :wink:
Have you tried searching for Collider in the scene view ? (select all or type), then it should pop up.
Cheers,
/Thomas

I noticed that the detection distance is different on different PCs. And I don’t have collider above my target.

Problem Fixed. I just Orthographic camera :slight_smile: