How to animate ms3d?

Hi

Welcome!



I think if you look at it as two seperate problems (keyboard controls and working with animated models), you should find it quite well documented.



You already have skeletal animation as that is what milkshape exports. All you need to do is control it.

Conveniently, this is done with a controller created by the importer.



Typically, the only controller is the animation controller, in which case you can do something like this:



file.getController(0).setMaxTime(2.0f);



Which will make it play only the first two seconds, over and over.
Take a look at the other controller methods, such as setMinTime, setSpeed, setRepeatType.
By combining these you can play any section of your animation, at any speed.

The keyboard input side of it should be pretty well covered with a forum search.
You can check out the flag rush tutorial for one example of keyboard controls (see lessons 5 and 6 in particular):
http://www.jmonkeyengine.com/wiki/doku.php?id=flag_rush_tutorial_series_by_mojomonkey

Hope that helps!

I think thread might help: http://www.jmonkeyengine.com/jmeforum/index.php?topic=8662.msg67225#msg67225



I am also using an ms3d model in my game and the JointController part works quite well. :slight_smile:



– Methyl

oH!, thanks…



My doubt was about how to control the model's animation, i'll check the thread about the JointController…



thanks… :smiley: