Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What do wiggly lines on the rotation tool mean?

Discussion in 'Editor & General Support' started by makeshiftwings, Mar 28, 2021.

  1. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    In the scene view if I zoom in on really tiny objects, and use the rotation tool, its lines are wiggly:
    upload_2021-3-28_10-19-40.png
    Is this a feature or just a graphical glitch? I took it to mean that floating point precision might be so low at that size that transformations might not work correctly but maybe I'm reading too much into it?
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,890
    Never seen this before but yes - it's probably related to floating point precision. Do you happen to be a good distance away from the origin? (128 units or more for example)
     
  3. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Hmm, yes, this particular object is 500 units away and like 0.01 in diameter so it would make sense.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,519
    You only have about 6 digits of actual accurate data with single precision floats.

    https://en.wikipedia.org/wiki/Single-precision_floating-point_format

    Quote: "This gives from 6 to 9 significant decimal digits precision"

    Position 500 takes 2.5 digits, 0.01 takes another 2, leaving you only 1.5 decimal digits. The pixels around that circumference are quite a lot more than you can represent with that.
     
  5. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    Yes, this is floating point precision. You will also see the effects of this if you zoom in too closely on an object.