Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Image stretches when rotated - making a character selection window.

Discussion in 'UGUI & TextMesh Pro' started by Mothil, Jun 15, 2015.

  1. Mothil

    Mothil

    Joined:
    Jan 14, 2014
    Posts:
    434
    Greetings. I'm working on a character selection window for my player, whereas as the player taps on the side of the touch screen, the 'wheel of players' rotate. 180 degrees, and -180 degrees work perfectly fine, but anything inbetween looks very strange and stretched.

    Here is a gif of the problem:
    stretched_image_GUI.gif

    For some reason I can't find out a solution for rotating it correctly. Anyone know how to fix this? :)
     
  2. LyveIG

    LyveIG

    Joined:
    Jan 8, 2015
    Posts:
    15
    Do not use the scale properties because these will cause your matrices to behave just like you're currently noticing. I assume that you also used scales on the parent objects at some point.

    Try resetting all scale values to 1 1 1, they're not meant to be used for layouting. Instead use the layout properties at the top of the RectTransform to adjust the size of your objects and use scale/rotation only for effects.
     
    Mothil likes this.
  3. Daybreaker32

    Daybreaker32

    Joined:
    Jun 11, 2014
    Posts:
    73
    Mothil likes this.
  4. Mothil

    Mothil

    Joined:
    Jan 14, 2014
    Posts:
    434
    That was indeed the problem - the scaling on the "Character_Rotator".
    Thank you both! :)
     
  5. Daybreaker32

    Daybreaker32

    Joined:
    Jun 11, 2014
    Posts:
    73
    You're welcome.