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.

Question Reset Rotation

Discussion in 'Editor & General Support' started by BurgerHobo, Nov 23, 2022.

  1. BurgerHobo

    BurgerHobo

    Joined:
    Nov 29, 2018
    Posts:
    5
    hey I'd like to know if theres a way to reset the rotation of a gameobject within the editor without actually rotating it. I just want the object to be at 0,0,0 without having changed rotation. it seems like there could be a reset rotation capability or something. thanks.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    31,216
    You could just create a new blank GameObject and reparent the object you're talking about underneath that new GameObject.
     
    BurgerHobo likes this.
  3. BurgerHobo

    BurgerHobo

    Joined:
    Nov 29, 2018
    Posts:
    5
    I'm having trouble with a blender imported file that comes out rotated if the parent gameobject is at 0,0,0. I think I have to figure out how to reimport it. TY
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    31,216
    Blender files will import the root at (-90,0,0)

    All child objects will be imported relative to that.

    If there is no single root, a fresh one is created at import time. A Blender file like this:

    Thing1
    Thing2


    becomes:

    Gameobject
    Thing1
    Thing2


    Be sure to apply all scales and rotations within Blender or thing get very confusing.

    For better control, export one object at a time to an FBX and import them all separately, assemble them yourself into a prefab in Unity.

    Here's more random reading about all this sorta stuff:

    Costs of Blender vs FBX:

    https://forum.unity.com/threads/any-cons-to-keeping-models-as-blend-files.1345850/#post-8497010

    Unity imports Blender3D objects as FBX via a little Python script:

    https://forum.unity.com/threads/from-blender-to-unity-problem.1073381/#post-6925811

    The Python script that Unity uses (substitute your Unity version number or search) to import:

    ./Hub/Editor/2020.2.1f1/Unity.app/Contents/Tools/Unity-BlenderToFBX.py


    More on fixing it:

    https://forum.unity.com/threads/all-my-mesh-folder-content-is-gone.1102144/#post-7094962

    Blender3D objects used as trees / detail in Unity3D terrain (See the second half of this response)

    https://forum.unity.com/threads/ter...trees-made-with-blender.1112119/#post-7155631

    https://forum.unity.com/threads/all...nging-parent-in-blender.1159283/#post-7442123

    Probuilder and Probuilderize and Blender:

    https://forum.unity.com/threads/probuilder-vs-blender.462719/#post-8060462

    Some more potentially-useful info:

    https://forum.unity.com/threads/orientation-problem.1265834/#post-8037734
     
    BurgerHobo likes this.