Search Unity

Question?

Discussion in 'Scripting' started by kingcharizard, Nov 1, 2012.

  1. kingcharizard

    kingcharizard

    Joined:
    Jun 30, 2011
    Posts:
    1,137
    I am trying to animate more than one object, but they each will have the same animation just in a different location. My question is can i use the same animation on each object or do i have to create a different animation for each.

    Currently when i try to animate the object it also has an x position and when i use it on the original object all works fine but when i use it on the other objects it moves them to the position original object. Also i think i should no im using the Transform of the game object to animate it

    Also i didn't know where else to ask this question, sorry if its in the wrong section.
     
    Last edited: Nov 1, 2012
  2. Democre

    Democre

    Joined:
    Mar 31, 2010
    Posts:
    345
    Have you tried animating the local position?
     
  3. kingcharizard

    kingcharizard

    Joined:
    Jun 30, 2011
    Posts:
    1,137
    no i have not I dont know how. I've never used the animation featured inside unity before.

    I need to animate the object on the y axis only but leave the x position unchanged on each object.
     
    Last edited: Nov 1, 2012
  4. Democre

    Democre

    Joined:
    Mar 31, 2010
    Posts:
    345
    How did you make or get the animations you are trying to use?

    Edit: Found an answer for you here.

    What you need to do is put each of your objects into their own empty game object. Move the empty game objects around to where you want those objects to appear. This will let those objects animate in the local space of that empty game object.
     
    Last edited: Nov 1, 2012
  5. kingcharizard

    kingcharizard

    Joined:
    Jun 30, 2011
    Posts:
    1,137
    I saw that topic and it didn't work i really don't understand why its so hard to achieve what i want to do... ugh i'm starting to get frustrated. i don't understand why im having so much trouble with a simple problem.. I've never had such trouble before.. I think im over thinking this..
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Please use relevant thread titles in the future...."Question?" doesn't help anyone know what you're asking about.

    --Eric
     
  7. kingcharizard

    kingcharizard

    Joined:
    Jun 30, 2011
    Posts:
    1,137
    Yes your right, next time i'll remember than. anyways I figured it out thanks for the advice.