The registered action is invalid

Hi All. What are the possible causes only the camera to be close enough registered action takes effect ? When the camera moves to a distance. Registered action cannot be triggered by clicking. I’m sorry I can’t reappear it in PG. yes . in PG everything is normal, no matter how far away.
Initial camera’s position:


Click valid camera’s position:

I did some tests. The effective distance is related to the minZ of the camera. but why ?

I totally do not get the question, I am sorry :frowning: @RaananW might have an idea ? a quick repro in the PG even if it does not repro :slight_smile: could help better understand the question I guess.

Would also be great to know what element you are registering the action to and how. is it possible that you have an invisible collider that captures the mouse?
As @sebavan said, a reproduction is key for us to be able to help.

I tried to reproduce this situation again. This time I succeeded. When there is an imported model, the registered action cannot be triggered. In addition to setting isPickable of the imported model to false, what else can I do ? ( It can be triggered after moving closer to the lens )
pg:
https://www.babylonjs-playground.com/#2NR585#3

Your picks are captures by the mesh called cornelBox. You found the best solution - set isPickable to false. If you want to avoid that you can also pick yourself, with a predefined predicate (i.e. - only pick instances), but as babylon already does it for you it will be redundant.
You can also set the pointer predicates yourself (Scene | Babylon.js Documentation), but that would be set globally and i wouldn’t recommend it

2 Likes