[away3d] Play animated MD2 files in Away3D FP10 version

Skip to first unread message


Apr 22, 2010, 8:23:57 AM4/22/10
to Away3D.dev
Hi guys...

I'm very new to away3d... I come from a pv3d background so I guess it
won't take too much till I feel comfortable with the library...

I'm loading a md2 model into away3d.... the model has some animations
as well... all the examples I see in the blogs say to use the play
method of the Mesh class... but what I realized is that the Mesh class
in the fp10 version of away3d doesn't have a play method... am I
missing something here? how can I play and control the animations of
the md2 model?

Some help would be greatly appreciated.

Thanks in advance

Miguel Kennedy

Subscription settings: http://groups.google.com/group/away3d-dev/subscribe?hl=en


Apr 22, 2010, 8:50:23 AM4/22/10
to away3...@googlegroups.com
welcome to Away Miguel.

You arrive at some moment where the doc and examples are not reflecting at all the latest trunk code. As we are in the process of releasing a new version.
On the animation side, lots of things have changed and we will publish more info on this soon.

Here's a snippet that uses the latest trunk that should help you get your anim running...

once the md2 is loaded (reffer to doc or search this group for loading procedures)

private function md2IsLoaded(e:Loader3DEvent) : void
var mesh:Mesh = _loader.handle as Mesh;
var animdata:AnimationLibrary = mesh.animationLibrary;
var myAnim:VertexAnimator = animdata.getAnimation("walk").animator as VertexAnimator;
myAnim.delay = 0;
myAnim.loop = true;
myAnim.fps = 5;
myAnim.interpolate = true;

Note: Transition class is missing in this update but will be reintroduced very soon.


Calá Hush

Apr 22, 2010, 9:48:08 AM4/22/10
to away3...@googlegroups.com
Thank you sooooo much Fabrice! I will try your code very soon...

You've been a great help! ;)

Miguel Kennedy


May 1, 2010, 8:38:49 AM5/1/10
to Away3D.dev
Hi Fabrice, just to let you know it work perfectly!

Thanks once again ;)

On Apr 22, 2:48 pm, Calá Hush <cala.h...@gmail.com> wrote:
> Thank you sooooo much Fabrice! I will try your code very soon...
> You've been a great help! ;)
> Miguel Kennedy
Reply all
Reply to author
0 new messages