This project is read-only.

Change animation at run

Nov 13, 2011 at 9:33 PM

Hi Ohan,

 im trying to change the animation of my project at run. For example i have a string called models, that string contain the name of the fbx. So the line of the model loader will be like this: Model sphereModel = (Model)loader.Load("", models); 

All its fine when i put the string into de model loader, but when i want to change that string (in the Update() method) something wrong happend (it creates a new model over and over again, its obvious..). For example: if (state.IsKeyDown(Keys.Right)){ models = "model2"; CreateObjects(); }

Can i delete the previous model from the scene? or maybe i must to create a lot of Nodes for each Model and delete and add it later to the scene???=
I know that something is wrong... but am i ok with my philosophy? Please help...