away3d-core-fp11 md2 animation

Software: Away3D 4.x

yogishpuri, Newbie
Posted: 11 December 2011 01:39 PM   Total Posts: 4

Hi,
is there any tutorial, that showing animated md2 in away3d-core-fp11?
In Broomstick example “LoaderMD2Test” is this code:
var controller : VertexAnimator = VertexAnimator(mesh.animationController);
controller.play(“run”);
But my mesh has no property called “animationController”.

   

Avatar
Fabrice Closier, Administrator
Posted: 11 December 2011 07:15 PM   Total Posts: 1265   [ # 1 ]

[loadercode]
loader.addEventListener(AssetEvent.ANIMATOR_COMPLETE, onAnimatorReady);

private function onAnimatorReady(event:AssetEvent):void
  {
  _vertexAnimator = VertexAnimator(event.asset);
  _vertexAnimator.play(“walk”);
  }

Note that this event will be removed in a not so far future, as we beleive it is not the parser task to build an Animator. (vertex or skeleton type)

In meanwhile this should work with both alpha and dev branch.

   

yogishpuri, Newbie
Posted: 11 December 2011 11:26 PM   Total Posts: 4   [ # 2 ]

Thank you Fabrice, now it works for me.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X