Hello Everybody..
I have run into a little problem, and I have not been able to resolve it.=
=2E You=20
can find the complete program at http://ben.echotech.ca/plib/game-0.3.tar=
=2Egz
The problem is that if I load the pedestal model (pedestal->loadModel())=20
before I load all the penguins, the penguins go missing but if I load the=
=20
model after then I have no problem. I tried to duplicate this problem wit=
h=20
tux_example.cxx and I was not able to, so I know its a problem with my co=
de..=20
Can anybody see what I did wrong.
Ben
void myLevel::loadLevel(int levelNum) {
ssgModelPath ( this->dataPath[0] ) ;
ssgTexturePath ( this->texturePath[0] ) ;
// Setup the pedestal
myObject *pedestal =3D new myObject ;
// This does not work.. Penguins go missing.
// pedestal->loadModel ( "pedestal.ac" );
// Setup the penguins
myPenguin *penguin =3D new myPenguin ;
penguin -> setLocation ( 0.0f,0.0f,0.0f );
penguin -> setScript ( 0 );
pedestal -> addKid ( penguin ) ;
spriteList->appendNode ( penguin ) ;
penguin =3D new myPenguin ;
penguin -> setLocation ( 0.0f,0.0f,0.0f );
penguin -> setScript ( 1 );
pedestal -> addKid ( penguin ) ;
spriteList->appendNode ( penguin ) ;
// This works.. Penguins are there..
pedestal->loadModel ( "pedestal.ac" );
=20
// Add to the scene
scene -> addKid ( pedestal ) ;
}
|