Search Unity

Question Novice question about orientation

Discussion in 'Prefabs' started by tleylan, Mar 8, 2023.

  1. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    I have a VR world with prefab assets (from some free kit) of things like chairs and tables. I noticed that all the prefabs are rotated 90 deg on the X axis. That makes me suspicious but things look okay in the world and clearly the chair is not facing "up" without that setting.

    I now need it so the orientation of the axes are set correctly on a few of them as I'm adding the ability to sit in the chairs. First is there any way to "change the orientation" from Unity? I don't think so but I figured I would ask.

    I managed to export as an .FBX so I assume that I can orient the assets I need in Blender (for example) and then reimport them. Just trying to confirm this is a reasonable choice before I spend too much time trying.

    Thanks.
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,632
    Blender uses a different coordinate system than Unity. For example, Y is up in Unity and Z is up in Blender. This means that anything you export from Blender to Unity will have a weird 90 degree rotation.

    Try using this custom Unity FBX from Blender export script for Blender:
    https://github.com/EdyJ/blender-to-unity-fbx-exporter

    edit: You can probably also fix it in ProBuilder.
     
  3. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    Thanks I've been reading up about it. I did manage to update it. It didn't seem to work for me while exporting but an article suggested changing the orientation in Blender first and then exporting it and that worked great. I will take a look at ProBuilder as well it would have been nice to do it within Unity if possible.