Model Moving through animationcontroller.update

Nov 10, 2009 at 11:47 AM

Hi Everyone

im new to xna and the XNAnimation library

I am having  a bit of a problem with the animation controller update function or my code.



I have a 3rd person game and my character positioned infront of the camera is fine however when i load the monster and run the animationController.Update(gameTime.ElapsedGameTime,Matrix.Identity) the mesh is not loading correctly ie certain portions move with camera others do not. (They should not move with the camera).

so i created the world matrix for the monster and added that to the controller update function ie animationcontroller.update(gameTime.ElapsedGameTime,,monstermatrix);

This solves the problem and the mesh loads correctly however when i change the position with a "monster.position=vector3.lerp(me.position,monster.position,0.2f)" then

the monster moves all over the place not towards my character


However if i do this with the matrix.identity in the animationcontroller.update it works fine (but mesh mangled)


So confused?


Thanks for your help in advance