Object rotation doesn't work in play mode.
I'm shocked I can't find an answer to this. It seems so simple.
I have a door in my game which is parented to an empty game object positioned where the hinge (pivot) should be. When editing in the scene window, everything works perfectly find when I rotate (on the Y axis) the parent... the door swings as it should.
However, when I press play, if I change the Y rotation, nothing moves.
I even animated the parent object and set a trigger to change a boolean parameter to fire the open animation. The trigger fires, the animation fires, the Y axis value changes exactly as I expected, but the door just sits there. The parent doesn't move when rotated in play mode, neither via animation nor manually changing the value of its rotation Y axis. It's like a cruel joke.
None of the transform variables have any effect on the object when the game is in play mode. It isn't just rotation. Position, Rotaion, and Scale, when changed at run time, have no effect.
Answer by unity_r9zovXxF7iY4Qw · Feb 09, 2019 at 09:42 PM
I had a similar problem, drove me crazy, the GameObj won't rotate even if I used all Rotate overloads.. Other GameObject worked but this one, which was my Character.
Solution(for me at least): I had attached an Animator component, which had "Apply Root Motion" unchecked. Checking this, made my Rotation work.
Good luck
Answer by elliselkins · Dec 09, 2016 at 11:01 PM
My children objects were static. Unchecking this made them move with the parent rotation animation.
Answer by edgrimaldi · Nov 14, 2016 at 06:34 PM
I just figured out that the parent object IS rotating, but the child object (the object that is visible) does not rotate with it. It maintains it's local values, but does not move. It is as if it is not parented at all to parent object. (Even though I know it is because it moves properly with the parent in edit mode.
Your answer
![](https://koobas.hobune.stream/wayback/20220612100646im_/https://answers.unity.com/themes/thub/images/avi.jpg)