Search Unity

Bug GameObject not rotating correctly in inspector....

Discussion in 'Editor & General Support' started by Thecreatorofmanysecretsthatmaybeholdmanygames, Apr 21, 2023.

  1. Thecreatorofmanysecretsthatmaybeholdmanygames

    Thecreatorofmanysecretsthatmaybeholdmanygames

    Joined:
    Mar 12, 2023
    Posts:
    4
    I have no idea why my GameObject rotates like this, and desperately need help. Project - Game - Windows, Mac, Linux - Unity 2022.2.12_ _DX11_ 4_21_2023 7_05_34 AM.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,686
    Looks like non-uniform scaling.

    Fix that by ONLY ever scaling leaf GameObjects, eg, ones that have no children.
     
    PraetorBlue likes this.
  3. Thecreatorofmanysecretsthatmaybeholdmanygames

    Thecreatorofmanysecretsthatmaybeholdmanygames

    Joined:
    Mar 12, 2023
    Posts:
    4
    When I take the 'cube' model out of the 'Gun' GameObject, It scales fine. However, I want the cube to be a child of the Gun, so it moves with it. When I put the model inside of the Gun, it does the non - uniform scaling.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,686
    Then restructure your hierarchy so that it satisfies the "only child objects scaled" criteria.