Disable action if behind mesh

hey team,

How could I disable an action’s mouse style when a part of mesh is behind other mesh?
for example if sphere is behind ground in this PG

I would like only action to be pickable when mouse is over above part of sphere, not on ground. Action works properly but the mouse cursor style change on ground.

Hi @Dshah_H

I use ray casting to solve this problem. When you select part of sphere that is behind ground. The first hit mesh by the ray is ground and it will not trigger the click event.


why to use rarycast? It just add more into performance , since the functionalities is already there in ActionManager to know, shouldn’t mouse pointer also not change if its not triggering any event? I presume its a bug? I don’t know what boss @Deltakosh @Cedric has to say about this.

I would assume action manager is also implemented based on raycasting. But let’s see what the bosses say.