decimal places, and Unity rounding stuff

User avatar
United States of America
Posts: 624
Joined: 09 May 2018
Location: United States
Clan: OP
Contact:
Status: Offline

decimal places, and Unity rounding stuff

Post by impossybull » 07 Nov 2019

So if there's a number in a text box, and I select the text box which selects the whole number, and type a decimal point ".", it does not get typed in. I have to type a number first for the existing text to get deleted, then the text box works fine.
-------------------------------------------------------------------------------
Unrelated:

If I were you I'd put in some statements in the functions relating to position and dimensions of objects, something like:

IF (round(abs(val)) - abs(val) < .000001)
THEN
val = round(val)
END

(yes, I know this is not C# LOL)

But it might help to eliminate the problems with things not staying integer values, which is probably just because of how unity stores floating points.
Just a suggestion :)
"Practice to gain skill"
          Image
               "Think to gain strategy"

Member of Split, SWAT, Milk, RT, Dark Masters, Criminal Gamers, Fusion, Greg Heffley, and leader of OVERPOWERED.
User avatar
Poland
Posts: 207
Joined: 07 Mar 2018
Clan: SW
Status: Offline

Post by UnknownGuy » 07 Nov 2019

Thanks! :D
My youtube channel can be found here
Image
Post Reply