Problem with multiple models (2012-07-06 03:12 by urz9999 #64491)
Hi, first i would say thanks for this great library, i'm currently trying do do some tests, nut i've encounter a strange behaviour when trying to load more than one model like this:
it seems that with more than a model the physics engine goes crazy creating some sort of "wind" effect. I tried to search for all the property of both model and MMDXCore but apart from disabling physics i can't find a solution. Really hope for an help! :)
I've tried to load different combinations of models but the result is always some kind of gravity problem having clothes and hair moving up without motion or movement. I've also put a reference tu bulletX.dll in order to have access to the physics property of MMDXCore.Instance but apart from the possibility of change gravity like in MMD the problem remains.
RE: Welcome to Help (2012-07-09 21:28 by urz9999 #64558)
Hi, i've tried your suggestion and effectively i can see the bones of the other models even if they are not loaded into the scene! So this could be the cause of the problem, how can i disable physics for invible models?
RE: Welcome to Help (2012-07-09 22:56 by urz9999 #64559)
Update: using model.Dispose(); partially resolves the problem but when i try to reload that model using Instance method ( MMDXCore.Instance.LoadModel() ) the program throws an Object Disposed Exception (obviously), also removing rigidBody from instance before loading a new model also partially works because if i return to the old model rigidBodies are gone and it has no physics.
RE: Welcome to Help (2012-07-09 23:38 by urz9999 #64560)
Update 2: Problem Solved! It was actually a problem of Xna ContentManager caching data. Creating a separate contentManager for models and calling this code solved everything:
Player.model.Dispose();
Player.model = null;
this.game.modelContent.Unload(); // This was possible having a separate content manager because it unload everything