When passing float to Vector3 it is taking only one digit after decimal

Hi,
I am building a simulation application based on Geo location which should be very precise. Here for example i have latitude and longitude values as 17.310529, 78.455506. when print these in log am getting same values . but when i pass them to vector3 it is taking only one digit after decimal (Like 17.3 and 78.4). In my application i want very precise values to place game-objects.
How to get the same exact values in Vector3.
Attached an basic snap (Not from my project:smile:) (Link for snap)

A Vector3 contains 3 floats so will be set to those digits. However, when you Debug.Log a vector3, the debug code will round the values it displays if you just pass a vector3. You could pass the separate floats if you want to see what they are. Like so;

Debug.Log("X: " + myVec.x + " Y: " + myVec.y + " Z: " + myVec.z);
1 Like

Don’t worry, your floats are passed exactly as you want. It’s just how Unity shows log for Vector3. Try printing vector.x and you’ll see everything is there…

1 Like

Thank you. it worked.