Author Topic: acceptable parent position values?  (Read 2859 times)

Gillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
acceptable parent position values?
« on: June 08, 2012, 10:48:08 AM »
I have several situations where I have multiple NGUI objects as children of an empty GameObject so I can move all of them together. I assumed that as long as I kept the position values of the parent to whole numbers, then MakePixelPerfect() on the children would display correctly. However, I'm seeing all kinds of non-pixel-perfect issues. Is there a key to parent positioning to make the children's MakePixelPerfect() actually display right?

Gillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: acceptable parent position values?
« Reply #1 on: June 08, 2012, 11:05:06 AM »
Update: I realized that I wasn't casting to (int) when setting the parent positions dynamically. Even though the float values being used technically should have been whole numbers already, they were being changed to slightly off, such as 73.9993 instead of 74. When I use (int), it fixes it.