Disable layers in 3D RTS game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Reitmania

Hey folks,

in my 3D RTS game I have several layers (e. g. in a house with several floors) and an isometric camera. I can move my chars by clicking on the ground of the floors using a baked navigation mesh.
The problem is: I’d like to disable certain layers (for example, the upper floor) to navigate to lower floors, but keep all the collisions for the chars. I just need to turn off the visibility and disable raycast, to enable clicking on the lower floor. When turning of “Input Ray Pickable” for the floor, it still responds to the mouse click.

Any ideas for a good approach for that?

Thx!

:bust_in_silhouette: Reply From: klaas

Hi,
have a look here:

the collision mask is your way to go. Just give every floor a unique masking-bit