Search Unity

rotation issue in world space

Discussion in 'UGUI & TextMesh Pro' started by AntFitch, Feb 21, 2015.

  1. AntFitch

    AntFitch

    Joined:
    Jan 31, 2012
    Posts:
    243
    Not sure if this is the way it's supposed to work...

    When I attach a GUI object to a character in the scene, then change the rotation on the GUI object, the GUI object does not rotate until the character moves. So, even when I see in the inspector that the GUI object is rotated 180 degrees on the Y axis, this does not appear to be true in the scene and game view.

    Here's my workflow:
    -Start game
    -Duplicate GUI object & attach it to character in scene (instantiate)
    -I use rectTransform.rotation to rotate GUI object on y axis.
    -I enable the GUI object so that it is visible.
    -GUI object appears in scene, but it's backwards
    -I check inspector and it appears that Y axis was changed.
    -Wait for character in scene to move.
    -Once character has moved, GUI object snaps to correct rotation.

    Am I missing something simple?