- Home /
Having an Animator play Either/Both/None of two animations
Hi folks Unity 2019, Blender 2.80. I have a car object with two child door objects. Each door has it's own bone and a separate animation for each. I want to be able to have the Animator state machine open/close either door, no doors, or both doors. I don't want a blend, so I don't think a blendtree will work (I tried it already). It's like I want the Idle state to fire two other states depending on the Boolean "OpenLeftDoor" and "OpenRightDoor". I can get the animation to play fine, I could build a third animation that has both doors open but that seems wrong. I just need a point in the right direction.
thanks!
Answer by MrRightclick · Jul 05, 2019 at 06:51 AM
You could have a different animator for each door, and then call the opening animations separately for each door.
OR if you want to have a single master animator, you could use Animation Layers with no blend (https://docs.unity3d.com/Manual/AnimationLayers.html) or more complicated state machines composed of multiple animators. I would go the separate animator route, though.