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

Using the same animation on duplicate objects.

Discussion in 'Editor & General Support' started by tmanallen, May 12, 2013.

  1. tmanallen

    tmanallen

    Joined:
    Nov 8, 2009
    Posts:
    395
    I have a question and if this is in the wrong thread please let me know so that I could move it, I have a game object that I did an animation on in unity and when I either make another gameobject and add the animation or duplicate the gameobject with the same animation the objects lump together in the same position playing the animation. Now I am planning on having like about 30-40 of these game objects per stage do I have to make 40 different animations for each gameobject?



    Thanks in advance for the reply's.
     
  2. FlaxSycle

    FlaxSycle

    Joined:
    Oct 6, 2012
    Posts:
    232
    All the objects will snap to the same position because the animation is overriding their position.

    To use the same animation at different positions, parent the object with the animation to an empty GameObject and move that to a new position. The animation will then play relative to the parent position.

    Hope that makes sense!
     
    tmanallen, BananaQueen7 and Koehl01 like this.
  3. tmanallen

    tmanallen

    Joined:
    Nov 8, 2009
    Posts:
    395
    Thanks for that, actually it does, about to try that now.
     
  4. tmanallen

    tmanallen

    Joined:
    Nov 8, 2009
    Posts:
    395
    Well I got it to work which is crazy of why I had to do it this way but I made the empty gameObject and put the animation on that and it worked perfectly.

    Thanks once again:D
     
  5. mhhk88

    mhhk88

    Joined:
    Sep 12, 2013
    Posts:
    5
    You saved my ass. Thanks ~~~
     
  6. punixer

    punixer

    Joined:
    Oct 25, 2017
    Posts:
    2
    Not Working to me. Must be doing something wrong.
     
  7. Koehl01

    Koehl01

    Joined:
    May 15, 2021
    Posts:
    2
    Hey, Thanks
     
  8. BananaQueen7

    BananaQueen7

    Joined:
    Dec 31, 2021
    Posts:
    1
    I know you posted this in 2013 but just wanted to let you know that it's still helping newbies like me out! <3 Thanks!
     
    tmanallen likes this.