Problems with Animator when disable/enable gameObject

I have a turret enemy that have a animator that always play a idle animation on it. The idle animation is just some of the top parts of it moving a little. I also have a turret script that is using the turrets ‘turret_rotation joint’ to turn the top of the turret around so it can look at the player. It works well with the turret turning around and tracking the player. I can select the joint in the editor and if i rotate it myself the turret will rotate from the new angle. So the animation to not clash with my turret script.

If i then disable the turret in the editor and then enable it again things break down. The turret keeps playing it’s animation but it no longer rotate. If i select the joint in the editor and try to rotate it no longer works. The turret will remain stuck in the rotation direction it was at when i disabled the turret. If i turn off the animator component the turret will start to rotate again but will not animate anymore. Turning the animator back on will snap it’s rotation back to the pre-disable rotation and it will resume animation.

Anyone has had problems like this when deactivate/activate of object seems to mess up the Animator. Seems to be a bug with it’s mask or something as it starts to animate one of the joints it should not touch. With an old value also :(.

I too have this problem. In Unity 5.3 and now in 5.4. Any word from Unity on this?

You can reset the rotation before deactive,
when you active it again ,it works.