when applyTransformation to mesh.geometry, the skeleton animation get wrong animation.

Software: Away3D 4.x

liuyi, Member
Posted: 21 October 2011 03:01 AM   Total Posts: 65

Yesterday, I spent almost 5 hours to reslove a skeletonAnimation issue, but no result.
see my post here:

Help~I embed model and animation in swf, but when play the animation. The model looks like be distorted.

Finally, I rewrite a clearly code, compare it with my project code.
I found my project code has one different with the test code.
this line:
mesh.geometry.applyTransformation((obj[‘transform’] as Matrix3D).clone()

so I replaced this line with:
mesh.transform=(obj[‘transform’] as Matrix3D).clone();

but another problem came….

I found my round shape no scale , it should be scale to 0.7.
tran = new Matrix3D();
tran.appendScale(0.7, 0.7, 0.7);

but mesh is correctly

I created the map with :
new AWPBvhTriangleMeshShape((roundCollisionModel.getChildAt(0) as Mesh).geometry)

roundCollisionModel.getChildAt(0) is mesh at above.


so result are two:
1, when set mesh’s transform, its geometry no change. get wrong collision
2, when applyTransformation to mesh.geometry, the skeleton animation get wrong animation.


I think this is a bug.

 

   

liuyi, Member
Posted: 21 October 2011 07:38 AM   Total Posts: 65   [ # 1 ]

My reslove:

For obj files,use
mesh.geometry.applyTransformation((obj[‘transform’] as Matrix3D).clone()

for MD5mesh(they have skeleton)

mesh.transform=(obj[‘transform’] as Matrix3D).clone();

fixed this.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X