Search Unity

Transform position/scale precision problem

Discussion in 'World Building' started by zIyaGtVm, Mar 28, 2020.

  1. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    131
    I'm sorry, I'm not quite sure what the problem is, or what keywords should I search for answer.
    I have tried many keywords but got nothing.So I post this thread.
    When changing gameObject in Hierarchy, The position/scale will automatically change by a small number like 0.00001 or 0.00002.

    GIF3.gif
    Here is the structure.Target GameObject's scale changed when I move it to another place.
    The parent object has a (0, 90, 0) rotation.
    The more steps the more offset.
    I wonder if it will cause many other potential problem such as walls' z-fight, or different scale prevent batching?
    Any


    Any advice would be appreciated.Thanks!
     
    valarnur likes this.
  2. rickydalseno

    rickydalseno

    Joined:
    Aug 12, 2020
    Posts:
    1
    you've already already probably figured it out, the problem is that floating points (float variables) by definition work with a margin of error to preserve efficiency. double variables actually do the job and are precise