Variables In Unity Flashcards
What is Floating Point Imprecision
Floating Point Imprecision means that the larger the value of a floating point number, the less precise it is.
This is a limitation of how computers store numerical data, and is not unique to unity.
In a game with a large or infinite playable area, the floating point numbers used to store positions could become large enough to cause problems.
If Game Objects have imprecise values for their position, they may appear to move around, flicker or pop in and out.
How to solve floating point Imprecision
One way to resolve this problem is to origin reset.
This means that once the player has moved a certain distance beyond the origin of the world position (0,0,0) we move everything in the scene back towards the origin.