Ogre 3D Animation Distorts

I have a robot model in Blender, It has a “Run” animation. The animation in blender works fine. But  when i put it in my game the animation distorts… I think theres nothing wrong in my code cause I have a working animated model using the exact same code… Does anyone of you guys know why this happens? Please help me I need this model… please

Here are some screenies

The animation is not trigger yet

now he runs,

Any idea guys, please please

I have no idea.

are you really really sure that everything goes well in blender ? cause sometimes I think it works well but in front view or side view I suddenly see some mistake. so you should check in blender again.check every frame with front view, side view

has you checked the z to y or y to z axis something in ogre exporter when you exported it ?

the animation in blender is smooth, and i selected "fix up axis to Y" when i exported it, i dont know why it distorts when i call its animation. Is there a setting in blender that i missed?

Make sure all modifiers (except the armature) are applied on the model in blender prior to export the ogre file

Sometime it can screw everything

All the modifiers are applied, except for the armature. This thing makes me crazy …  :’(

heres the .blend of my model


please have a look

Is it possible that you imported the rig from another model that was in a unfavorable rotation once imported? If thats the case i think press control+alt+A I had the same exact issue with one of my models though the aligning it never helped for me maybe it will for you

No i dont import the rig, i created it for that model. I tried ctrl-alt-A, but problem still occurs.

thanks for the reply guys…

it really looks like a weight painting problem on the screen shot.

Does the exporter warns you about vertices that are not bound to bones when you export?

are you using JME2 or JME3?

im using jme2, no warnings in the exporter… I think i weigh painted it properly. Please see my .blend file…

If its a problem in weigh painting, the animation in blender would have been distorted too, but its not.

i cannot see your blend file, i will look into it as soon as i get home in about 2 hours

ok thanks, ill check the weigh paint… its my primary suspect…

I think i got something

you used scales, rotations in object mode on your skeleton and your model

when you want to adjust the rig to the mesh, make sure you are in Edit mode.

I'll try to fix this and come back to you with a how to :wink:

Ok first know that you can apply all the transformation done in object mode to obects by selecting them and hit ctrl+A and choosing the first choice in the menu.

But doing this is screwing up your animations.

So do like that :

1- select the armature and go to pose mode

2- select all (hit the 'a' key twice) and clear all rotations, scales, translations (respectively alt+R, alt+S, alt+G)

3- Make sure the armature and the model are in object mode, select all, and clear again all rotations, scales, translations

4- you need now to re-adjust the mesh and the armature : select the mesh and go to edit mode

5- go to side view (hit numpad 3) and rotate the mesh 90

thank you nehon!!!  :D Hooray!! i got it working thanks

Your the best!  :smiley: :smiley: :smiley: