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

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:
    36,951
    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:
    36,951
    Then restructure your hierarchy so that it satisfies the "only child objects scaled" criteria.