Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Blender animation with Unity and iTween: what parts should I NOT animate in Blender?

Discussion in 'Animation' started by cheezballs, Oct 13, 2015.

  1. cheezballs

    cheezballs

    Joined:
    Sep 6, 2015
    Posts:
    2
    I've got the case were one human needs to jump off of an object. I know the smartest thing would be to animate just the legs bending and the spring up and then use iTween in Blender to actually physically move the character. This keeps Unity aware of the object and its colliders and rigidbody.

    Now, what if my character needs to rotate in the air and do a flip? Is it safe to animate the rotation of the bones in Blender? Will Unity see the rotation properly and know the orientation of the human character? For instance, if he ands face up or down will Unity know that he's been rotated in world space?

    Is it OK for me to assume rotation is safe to animate in Blender, but location translation should happen in Unity?
     
  2. UbiquitousStudio

    UbiquitousStudio

    Joined:
    Oct 11, 2015
    Posts:
    24
    You could animate the entire animation in Blender or Unity Think of the floor in Blender as 0 point in unity so when you animate the roll in Blender that is how it would look in unity. You could just animate the entire model all in Unity. I have tried this recently, but it lagged my game when played in the player so I have come to the conclusion that I am better off making all my animations (as many as I can get away with) in blender. At the end of the day, it doesn't really matter and it's up to you.
     
  3. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    I assume your Blender model has a root bone (a bone that is the parent of all other bones). There are two concepts for managing animation and movement in Unity according to which the translation of the root bone is either ignored or applied:

    1) Enable root motion. In this mode, your animation tracks contain the translation and this actually drives the movement of your GameObject in Unity (ensures very good matching between feet and ground, can look more realistic, requires more effort and attention to animation tracks). Adding additional translation (eg. making a jump wider or higher) is possible.

    2) Manage position yourself. In this case the root bone should always stay in the same spot. You will have to update the position of your GameObject to match the running animations yourself.

    In either case, having rotation in the root bone is okay. The model will simply rotate and so will its bounding boxes & any colliders attached to it.