- Home /
Multi story buildings in top down game using 3d engine
I am creating a top down game with the 3d physics engine and want to implement multi story buildings. Different buildings can be on different Y axis levels because the ground will be uneven terrain. The camera will be a fixed distance on the Y axis from the player. The camera needs to be able to see the player character, and everything on the player's current floor. I plan to use stair cases to traverse the different floors.
Is there any best practice or packages that can help to achieve this?
sounds fine to me as long as each floor is a separate object
You just have to make all other parts, of the building which are between the camera and your player, invisible. Then your idea should work.
Answer by maxus · Apr 08, 2014 at 02:57 PM
Here is how I implemented it in the end. For each building game object, here is how the hierarchy should be organised:
Building
Ground Floor
Walls
Floor
First Floor
Walls
Floor
By default, only the ground floor would be visible and the renderers of the game objects in all other floors would be disabled. I then have trigger points in the bottom and top halves of the stair cases, that hide and reveal the previous or next floors when they are triggered by the player.
Answer by Benson97 · Jun 08, 2018 at 08:10 AM
@maxus Hi, I am new to unity and I am developing a similar game like you did, a top down 3d game which is like if player go inside a building the floors above him will disappear. However now I am having a hard time about how to do it through script or other method, I can't find any tutorial or forum talking about it, but looks like you did it. Can you give me some direction about to make it? I doesn't really understand what you said in your method.
Your answer
![](https://koobas.hobune.stream/wayback/20220613141919im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Top Down Style Player Position Wrapping 1 Answer
Instantiating a prefab/bullet and sending it to my mouse position?? 0 Answers
2D Rotation for aiming problem 1 Answer
(noob) Weapons in 2D game? 1 Answer
C# LookAt Mouse 2D 2 Answers