Search Unity

Rotating an animated GameObject not working even via parent object.

Discussion in 'Editor & General Support' started by DavidBVal, May 26, 2019.

  1. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    206
    I am trying to rotate an item around y axis with the transform.Rotate() method. It is an animated character, so I made sure to create a parent gameobject to hold it, and then rotate the parent instead, otherwise the animation rotation would override the one I'm setting.

    The problem is, it is not working. At first, both parent and character have a rotation.y value of 0. If I set it to 60 on the parent object (via code or editor), then the child object rotation.y becomes -60, nullifying the parent rotation. I have no idea why this is happening...