Hiding/Showing different floors

Hi,

So If I want to make a top-down game and wanted to implement multiple floors that player can move what’s the best way to hide the above floors so that you can see the player?

Unfortunately, I don’t see many guides or discussions about it. Thanks for the reply.

What is a floor here? An actor? Hard to advise without knowing what the floors are comprised of.

If it’s just a bunch of components, you could have them attached to another component and hide that:

image


You may need to add more details to get a better answer.

The floor can be anything like static mesh or actor, but what I am interested in hiding the mesh above you. How would you achieve this? Line trace? Culling volume? I want to know how you would do multiple floors if you are making a top down game.

  • keep the floors in an ordered array, you know which floor you’re at, hide anything above said index when entering a floor trigger.

  • Trace? Sure, trace Up the Z

image

Filtering Object Types will make it efficient.

  • volume overlap? Why not? Can be attached to the player, once they enter a new floor, get overlapping floor actors.

Another idea is to use a sphere mask:

How does that sphere mask occluding look to you? Disorienting? I feel disoriented. I will take a look at camera-based sphere mask. Thank you for the reply.

Yeah - same here. This example, sure - not the best execution! But you can make it much larger, neater, more nuanced.