Search Unity

[Solved] Instantiated prefab contains the wrong rotations?

Discussion in 'Addressables' started by MaskedMouse, Aug 15, 2018.

  1. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    Mystery Solved:

    It's not a bug, just confusing. Unity is showing the Local Rotation in the Transform component in the inspector.


    [Old Post]
    I seem to have found an Issue tracker describing the same issue.
    https://issuetracker.unity3d.com/is...to-assetbundle-changes-its-transform-rotation

    But it is a won't fix. Having correct rotations in children objects is quite crucial for a project. I can't imagine that this won't be fixed.

    Old Edit:

    Found a post that said that only the inspector is showing weird values and that when you debug the values they're actually just fine as is.
    I am so confused about it now. It looks indeed the case that the inspector is showing wrong values.

    https://forum.unity.com/threads/instantiating-from-an-assetbundle-rotation-inconsistency.516946/
     
    Last edited: Aug 15, 2018
  2. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    332
    Hey, I worked on the Asset Bundle side of that bug. As you already pointed out it's an inspector issue. Unity under the hood uses quaternions for local rotation (https://en.wikipedia.org/wiki/Quaternion) but they are not very intuitive to work with. So the inspector converts this to eular angles, however thanks to floating point math precision there will be inaccuracies in what is displayed as in this case.
     
  3. isgoed

    isgoed

    Joined:
    Oct 18, 2019
    Posts:
    4
    Any chance that bug: https://issuetracker.unity3d.com/is...5.1078048505.1582799480-1976819345.1567516383 will be solved?
    I am loading objects from assetbundles and I need to verify that they are in the correct place (the asset bundle could have a wrong position or the file had a wrong position in its configuration). However, when the editor shows incorrect positions, this becomes a very difficult task. I already spent 2 hours trying to find a work-around.