Click detected outside the object with the input

Hello everyone, I am working on a scene that has machines with buttons that show information when clicking on them, the problem is that testing the scene many times I click outside the buttons and the information is shown the same, especially when I do it with the camera looking towards the game screen that is behind at the beginning of the scene. Check well that there are no nearby elements that are receiving the click but I did not find anything that helps me solve this problem.

Here is the link to my project: PlayCanvas | HTML5 Game Engine

Here is the link for the build: EXPERTA AUTOELEVADORES - PLAYCANVAS

Thank you so much!

Hi @5seis,

I just wanted to confirm which buttons you’re having an issue with. Is it the blue circular ones? If so it could be because the element component is rectangularly shaped, and the engine does not respect opacity when it comes to clicks. Any click within its square will register even if it is not directly on the circle.

1 Like

Thanks for your answer eproasim, sorry, I forgot to mention that it was about the blue buttons.
The scale and opacity are controlled by the tweenscale script, I tried to disable it in all the buttons but the same thing keeps happening.

Hi @5seis,

If you’re talking about the “Ingresar Al Autoelevador” button. The element size of the button you’re using is really large. I resized it in a fork of your project here:

https://playcanvas.com/editor/scene/1151734 You should see that you now need to be more fully on the button for the click to register than before. Is that the blue button you were talking about?

1 Like