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

Is there a way to increase Animator floating point digit?

Discussion in 'Animation' started by segant, Feb 26, 2019.

  1. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    I'm working on a game which in-game characters have their specific weight and agility value. But i need one more digit after . in animator float parameter. Currently it is like 1.1,1.2,1.3 but i need value like 1.25 Is there a way ?
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,553
    Just set it to 1.25, you don't need to do anything special. Even if the UI rounds the displayed value, the actual value it uses keeps the full precision of a float.
     
  3. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    I'm not sure about that.I think it keeps value but uses that only one digit
     
  4. TransformsDante

    TransformsDante

    Joined:
    Nov 4, 2019
    Posts:
    2
    From my own testing, it appears that @segant is right. Some operations are done on the rounded value. Perhaps it only happens when the animator window is open?

    However, this does not affect things like using a parameter as normalized time or a speed multiplier, but it does affect transition condition comparators. (at least in 2019.1).

    Maybe @Mecanim-Dev can speak to why this is, and whether there is a fix incoming?