Author Topic: NGUI in my scene causing rounding errors  (Read 1417 times)


  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
NGUI in my scene causing rounding errors
« on: February 21, 2014, 05:07:55 AM »
Hi, new user, but enjoying the power of NGUI!

One thing I've noticed is that I have some objects in my scene that should have rotation of 0,0,0 but with an NGUI root object for my menu stuff makes the rotation 2.504478e-06, 0, 0 and if I alter I try to alter it back to 0,0,0 it goes back. But if I delete the NGUI Root object, it goes back to 0,0,0 without even editing!
Was wondering if this was a known problem and if there's any workarounds as it might be affecting the physics in my Unity scene.



  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI in my scene causing rounding errors
« Reply #1 on: February 21, 2014, 02:58:38 PM »
It's a matter of float comparison. 2.504478e-06 is actually 0.000025, which is close to zero. Since the difference between that and zero is insignificant, nothing happens. Change it to 1 then to 0, and it will take effect.