Losing float precision when adding to Vector3

Hey Unity’ers :slight_smile: I’ve got a bit of a strange problem - I’ve got 3 floats which I’m adding to a Vector3. They’re originally initialised to 0f,0f,0f, and are then overwritten when new data comes in.

when any of the 3 values change, the Vector3 gets rebuilt; however, it seems to lose all precision, down to 0 decimal place, whenever added into the Vector3 struct. This means that 20.45f turn into 2045f.

This does not happen when building and running the game on my own computer. This only happens when building the game and running on another computer. How does this happen?

vector3 is just a class of three floats so you are probobly not loosing any precition in your game. my guess is that your string display in a debug or print statement is just shortened by unity for easier reading. but I would guess that the actual floats are safe.