Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animation causing jump to origin even after parenting to empty game object

Discussion in 'Animation' started by Jokeman258, Dec 8, 2013.

  1. Jokeman258

    Jokeman258

    Joined:
    Jun 1, 2013
    Posts:
    23
    Alright so I've been having this problem with a skeleton model I brought in with animations where when i start the game and the animation starts the skeleton jumps to (0, 0, 0)

    I've had this issue several times before and usually it is solved simply by parenting the model to an empty game object, but this time that isn't working. When i parent it to an empty game object, the skeleton offsets its position relative to the gameobject so it is again at 0,0,0 in world space.

    I thought it might have to do with the fact that the skeleton is made up of several different parts, with the parts of the arms parented together and such but no core thing everything is parented to like how a rig would be set up (didn't see the need to rig since it's all separate objects already). However this is the same way my spider monster is set up (has a rig for changing its body form a bit but only one piece is bound to the rig) and parenting to gameobject worked for the spider.

    I saw somewhere that they made it work if they dragged it straight from the project folder to under the gameobject but i tried that and still did not work.

    both the spider and skeleton use generic type rig and mecanim animation, so I'm really confused because I've been trying to find what's different between spider and skeleton and just can't so if anyone has any ideas on what the problem is it would be greatly appreciated

    Thanks!
     
    Last edited: Dec 8, 2013
  2. Joker_54

    Joker_54

    Joined:
    Nov 24, 2013
    Posts:
    64
    Try to uncheck the Box for Rootmotion in the Animator Tab.
    Remember: If you used your Animations to move your Object, you have to do it manually after.

    This solution atleast partially worked for me, some Animations are still bugged.

    Greez Joker
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Two possibilities come to mind:

    1. Does the skeleton's walk animation moves forward and, at the end of every loop, jump halfway back? If so, it may be that the animation contains root motion but you're also moving the object manually, for example using CharacterController.Move(). If this is the case, then use a non-root motion animation instead, or stop calling CharacterController.Move() and let Mecanim's root motion system handle movement.

    2. Does the skeleton jump to the origin of the scene -- that is, world position (0,0,0)? If so, is the skeleton's root object perhaps at world position (0,0,0) and the actual mesh offset away from the origin by some amount? I've come across models like this that weren't exported properly.

    I hope those ideas help. If not, post a screenshot of the Scene view and the Inspector view for the skeleton.