Best Practice for animating identical doors?

Hey All,

So here’s the situation: I have a 3dsmax model of a building with about 30 identical doors in it, positioned as I need them (it’s from a Revit model, for you architects out there). I want to bring it into Unity, then be able to go up to each door and open them individually. I’ve figured out a few ways to do it, but they’re all kind of clunky. Here’s what I’ve tried, what would be better?

  1. Animate and export one door to Unity. Add a trigger (since I want the door opening to be location based), add my script, turn it into a prefab. Copy it 30 times and painstakingly move them into position by hand.
  2. Open file in Max, animate each door individually at intervals. Import to unity, and split the animation into ‘OpenDoor01 / CloseDoor01, OpenDoor02 / CloseDoor02…’ for every door. Then add triggers to each position, assign a different animation to each, etc. Kinda hard to remember which door number goes with which trigger, though.
  3. Animate one door in 3dsMax, instantiate it to all of the correct positions. Then use ‘export selected’ to export each into its own fbx and import them all into Unity. Add triggers and scripts.

I like option 1 because having a single prefab definitely makes the most sense, but it’s a pain to move everything into position. 2 and 3 are nice because I can do the positioning inside of max, but the work done in Unity is slower and more complex than it needs to be. How do you do things like this? What have you found to work best when working with a repeated element like this?

Option 1 is your best bet… and it might not be as painstaking as you initially feared. If you don’t know about Surface Snapping and Vertex Snapping, I’d suggest reading this page from the Unity docs:

A surprising number of Unity users don’t know about this, but it can be a huge timesaver for repositioning GameObjects.

You can directly set the values in Unity, too. How is it a pain to move them? Maybe there’s an easier way we can point you towards. If you have positions already in Max (relative to the building), for example, you can Use Maths to quickly figure the positions in Unity (again relative to the building).

I’d very highly recommend using prefabs. If you have multiple copies you will hate yourself when you have to make some minor change like opening speed, and you have to locate the thirty copies and change them each individually.