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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

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

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

  1. PenProd

    PenProd

    Joined:
    Dec 17, 2022
    Posts:
    144
    Edit:

    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