PDA

View Full Version : Question about rendering


LordElessar
02-05-2007, 02:57 PM
Hello guys. I have a doubt here.

I am doing a little game here, 3d with isometric view and I don't know how I can do one thing. Its a medieval game and I have houses, keeps... So... suppose that I enter in a house that have two levels. How I have to do to show only the first floor of the house?? And if i go to the seconf floor, how I do that? And if the player was outside, show whole house.

I have to model every floor and render the floor that the player are? Or I model the whole house and do another thing??

Thanks for the help!

TheNut
02-05-2007, 03:43 PM
All you need to do is a cube boundary check. If the player is inside the cube, render the floor and contents the player is in. To detect the floor he's on, you can either reuse your cube boundary check for each level in the house or you can check the Y-axis (your up/down axis) value of the player. To render the rooms quickly, treat them as separate entities and not one big render. All other floors are culled out of the rendering process, unless you have glass floors =)

LordElessar
02-05-2007, 04:14 PM
Thanks! Now I understood how it works!!