I’ve modelled a room with two connecting hallways with sliding doors, it’s a super fancy space station!
The two doors are identical, in fact the entire room is just mirrored in 3ds Max. In one of the hallways (where the player starts) there is a collider trigger, the player walks in to it and the door opens - tada! And that worked just fine at first when I only had ONE door (the old space station) now that I have two doors the trigger open them booth - not good!
I found a solution to just offset the keyframes in 3ds max for the second door and spliting it into two animations in Unity: Open and Open2. But now I have two identical animations just taking up space, isn’t this unnecessary? Also the animation needs to be applied to the parent object of the prefab, not the door itself. If I assign the animation to the door object, nothing happens.
So my question here is; how to reuse the same animation on different doors, so that they may be triggered by different triggers at different times.
Also, I have a door controle on the wall (on the other sider of the door), so on this side of the door you have to click on the controle to open the door. Problem here is that when I assign the script to the controle objecet the prefab connection to the Max-imported scene (the space station (the room), doors and controle meshes) is lost, the problem with that is that now when I keep modelling and updating the space station in Max the automatic updating of the assets is not working as well.
So the second question is how to have ONE script that I can assign to different door controles and have them open specific doors. Reusing assets FTW!