Pointer Event Data does not use the PhysicsRayCaster event mask.

I’m dealing with an isometric click-to-move game where I have multiple floors. I have colliders set up to trigger culling masks when the player moves to another floor and this works perfectly. Each roof is culled from the camera as the player moves up or down by using Layers Roof1, Roof2, etc.

I’ve also put an eventmask on the PhysicsRaycaster on the camera, but this shows very erratic behavior. The PointerData worldposition when I click on the ground I use to trigger an ‘ongroundclick’ event is often the one on the higher roof, which does not show on the current camera and is hidden from the raycaster by the mask.

Any ideas? Is the PointerData from the built-in event trigger ignoring the eventmask I set up for the PhysicsRaycaster? Could the NavMesh have something to do with it?

I’ve been trying to get this to work for days now, and I’ve tried everything. If I limit the draw distance of my camera to the exact floor height it works better, but it’s still erratic. I’ve also tried multiple camera’s, one for rendering and one for raycasting that was optimized for draw distance, but even though that works a little bit better, it’s still not perfect and really slow.

Any idea what causes the pointerdata to register objects that are masked in the raycaster?

There are many things that can be going wrong here. Do you have an example project you can share?