Search Unity

Model distorting when animation plays

Discussion in 'Animation' started by Wolfgabe, Aug 12, 2019.

  1. Wolfgabe

    Wolfgabe

    Joined:
    Sep 4, 2016
    Posts:
    130
    So recently I have been following this tutorial series on Youtube on how to create a basic 3D platformer. Right now I am on part 8 where you actually start importing actual character models and doing animations and everything was going smoothly until I got to this part where it showed me how to copy and past and idle animation into the animator timeline. Now the model looks fine normally but when the animation plays or when the game is running the model becomes extremely distorted like this.




    I cannot quite figure out why its doing this or what I am doing wrong. Does anyone know a solution to this problem



    For added reference here is the video series I have been following. Its around 14:10 where I start to run into problems
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    It looks like a scale missmatch. That exact look is what you get when a model that's imported at one scale is matched with an animation that's imported at a different scale.

    Looking at your inspector, the object is scaled to be 100/100/100, which is somewhat strange. As a first step, try changing that to 1/1/1. After that, make sure all your models have the same values in the scale import (it's towards the top of the leftmost tab of the model importer, I think)
     
  3. Wolfgabe

    Wolfgabe

    Joined:
    Sep 4, 2016
    Posts:
    130
    Okay for better clarifcation the character model I scaled to .15 on the X Y and Z axises in order make it more in line with everything else based on the tutorial. I could not find the idle animation they used in the character model hierarchy so I took the animation from the idle animations folder labeled Take 001. Looking at the main character model the the scale factor is 1 but the file scale is 0.01. However I am unable to edit the file scale from what I have seen. In all the other models for the animations the File Scale is at 1 being the same as the scale factor.

    I have done some reading and generally Unity's physics engine interprets 1Meter in the game world as 1 unit in the imported file. However I don't see the convert units option anywhere for some reason.



     
    Last edited: Aug 12, 2019
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    The file scale is given in the authoring program - so Blender or Maya or whatever.

    The 0.01 file scale thing is something that happens with certain export options in blender- I'm not an animator, so when that happens I generally just tell our animator to fix it.

    If there should be an idle animation on the character, but it's missing, you should go to the animations tab in the import and check if the animation might just not be added yet. You could try to do that - click the + button and check if there's an idle animation you can select in the source take dropdown.
     
  5. Wolfgabe

    Wolfgabe

    Joined:
    Sep 4, 2016
    Posts:
    130
    I mainly exported the .blend file as an FBX file which is what I am currently using just so you know. In the tutorial video there were a bunch of animations under the model drop down hierarchy that I didnt see when I first imported the model.