Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Use one animation for opening different rotating doors (in 3D)

Discussion in 'Animation' started by PenProd, Jan 3, 2023.

  1. PenProd


    Dec 17, 2022

    Never mind. I'm stupid. I'm confusing the position for the rotation.

    Original question

    I just started with Unity a few days ago and I'm now trying out simple animations. I have a wall with 4 identical doors. I would like to create one animation to open a door, which I can then use on each door when needed.

    The problem is that it doesn't seem possible. In order to get the pivot point on the side of the door, I would need to create an empty GameObject that will be used as the pivot point, move that to the side of the door, then make the door a child object of the pivot point. Then you simply rotate the pivot point in an animation, and the door being a child, rotates along.

    Now since the pivot has it's own position in 3D space which is not equal to 0, 0, 0, I can't use that animation on the other doors.

    So is what I want at all possible? If so, how should I do this?
    Last edited: Jan 3, 2023