Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Stopping character teleportation

Discussion in 'Timeline' started by Gord10, May 31, 2018.

  1. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    129
    I am sure it has a simple solution, but I couldn't find it yet.

    I am trying to make a scene with animated characters. Just at the moment I add Animation tracks, they get teleported to 0, 0, 0. Okay, I change their Apply Track Offsets to the positions I want them to be in. It works nice in Timeline preview, but then they get teleported to somewhere when I start the game.

    Is it possible to stop all these teleportations? I want to be able state where the characters need to be in their Transform myself.
     
  2. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    This is probably not the best solution but I just made the characters a child of another game object that's only purpose is to set the start location.
     
  3. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    393
    @marcV2g Well, parenting an object with an animator to an empty object is kind of the standard procedure if you are going to be moving and rotating an object which will also play its own separate animations. It's done that way to avoid one animation overriding the other. I'm not sure what Timeline is doing in the background which causes the object to get zeroed out. But parenting a skinned mesh or an animated object to an empty to move it or rotate it is usually best practice. I guess, Unity devs will have to create a workaround (like automatically parenting the objects to a dummy empty object or something) or will have to educate the users.