I’m trying to use the VertexAnimator in Away3d 4.
I load a sequence of OBJ files (md5 is no option sadly), containing the shapes geometry.
I was using http://abiyasa.com/blog/2010/05/20/vertex-animation-with-away3d/ as a starting point.
But it looks like also the VertexAnimator has been completly revamped, for the better it looks like.
Anyway, after loading the objects and setting a seperate namespace (shouldnt one really set AssetType?).
In an onAssetComplete event handler I now call :
if (event.asset.assetType == AssetType.MESH && event.asset.assetNamespace == "shp")
{
var shp : Mesh = event.asset as Mesh;
ShapeAnimation = new VertexAnimator(Model.animationState as VertexAnimationState);
ShapeSequence = new VertexAnimationSequence("unfold")
ShapeSequence.addFrame(shp, 1);
ShapeAnimation.addSequence(ShapeSequence);
}
However this throws me;
1195: Attempted access of inaccessible method addFrame through a reference with static type away3d.animators.data:VertexAnimationSequence.
An error I don’t understand, should I be using _frames instead?
Sorry for the messy code, I am in the fase of trying to figure this out.
Plus, I guess i should call addSequence() only after i’ve added all the frames really.
Any clues from the gurus?