Retrieving MS3D Animation information

Hi folks,



Is there any doc written that deals with animation within jME? I suppose it would be something explaining how to use the controllers. I want something specifically for MS3D files, do I have to write my own code for that, or is there code already present in jME for that?



Thanks in advance!



Son Of Cain

From Gamedev's Java forums

I am also trying to figure out how to animate a ms3d model.  Upon first inspection it looks like I need to use a JointController as Opposed to a KeyFrameController but I'm not quite sure how to go about this.  Seeing as Cain Jr. also had a similar question this could be a good place for a tutorial.  Another idea would be to expand the Milkshape loader example to be more akin to the MD2 loader example in order to demonstrate how to switch between different animations.



-Alex

The MS3D importer comes with an own skeletal animation controller, specifically JointController, which gets loaded along with the ms3d model.

To get  feeling for how to work with that, just make a copy of jmetest.renderer.loader.TestMilkJmeWrite, and add the line


        ((JointController)i.getController(0)).setTimes(1, 10);


at the end of TestMilkJmeWrite.simpleInitGame() - that will only play the first ten frames of the animation.
Note that you'll need the jmetest-* jars on your class path to load the test model.

hth