View Single Post
Old 02-26-06, 06:59 AM   #4
Mike 'Red Ocktober' Hense
Commander
 
Join Date: Sep 2001
Posts: 445
Downloads: 0
Uploads: 0
Default

ok... given the answers above it should be really simple... all you're going to need to do is to hide the compartments that you are not in at any time...

you can load the sub and all the interior compartments... and then hide everything except the compartment, or the submarine and bridge that you start out in... then let your position determine what gets shown and when.

also, the sub interior does not have to be positioned inside the sub model shell... it can be positioned at at 0,-1000,0... way below the sub, and when you are climbing down the ladder, once you reach a certain y position, just reposition the view to the bottom half of the ladder in the interior compartment and continue going down untill you reach the deck...
the transition will be seamless, and you won't know the difference.

i use this methodology in the 3DRAD demo i have posted... if you go near the ladder in the control room, turn towards it (look a lil ahead, it's not 100%) and hit F1, then you will go up to the conning tower, a separate part... do the same at the ladder in the conning tower, and you will be on the bridge... (F2 to come down)

this way the sub can move around, and when you are on the surface and on deck or the bridge, it will seem like you are moving...

but if your model is such that you want the compartments inside the sub model and in close proximity, the same methodology can be used...

... just make up a small function that determines where you are at (based on EntityZ() for moving forward and back, and EntityY() for moving up and down... have this value printed out as you walk the length of the sub and note where each transition to another compartment occurs... if witin that range, show the compartment you're in, hide everything else.

i hope i've explianed it clearly enough... lemme know how everything works out.

--Mike
Mike 'Red Ocktober' Hense is offline   Reply With Quote