I am nearing completion of a structure I have created that represents 4 game levels with each level also representing a level in height change such as second floor, third floor, 4th floor. When the levels are all combined they reveal a completed structure, inside and out.
I am trying to decide how organize the levels in game to efficiently implement a no roofs option with a third person view.
I know I can traverse the scene and toggle Alpha for textures but I would think this to be an error prone approach.
I was thinking that I might need to create a shell for the structures that chars see when outside and move the char to the inside of the level when appropriate but that seems like your duplicating a ton of geometry.
Any suggestions on a efficient no-roofs option with third person view?
Unless Iām misreading something, the simple way to do this (to me) is to organize your buildings into level nodes and give those nodes a ālevelā user data.
Whatever you do you will need to keep track of which floor a user is on anyway (unless thatās what you are asking how to do). Whenever they switch floors, find the current level they are on, iterate down from the root node until you hit a node with a level and toggle itās cull hint Always or Inherit depending on if that level should be visible or not.
Yepā¦ wonāt even be sent to the GPU. Also, nothing in that particular level will go through normal cull checking, etcā¦ itās a very efficient way to ācullā (ahem) parts of the scene.