Is there a way to increase the decimal precision in the Console when displaying a Vector3? For example:
Debug.Log(Vector3(0.12345, 0.12345, 0.12345));
Returns:
(0.1, 0.1, 0.1)
UnityEngine.Debug:Log(Object)
Whereas the much more awkward:
var v:Vector3 = Vector3(0.12345, 0.12345, 0.12345);
Debug.Log("(" + v.x + ", " + v.y + ", " + v.z + ")");
Returns what I would prefer, albeit with a much more awkward syntax:
(0.12345, 0.12345, 0.12345)
UnityEngine.Debug:Log(Object)
No need to create your own; Vector3.ToString takes a format specifier. See: More precise Vector3 - Questions & Answers - Unity Discussions
Loius
2
Nope, Vector3's debug is truncated specifically so you don't have to worry about all those
in-most-cases-irrelevant digits.
Create your own function called DebugVector3 or some such and call that instead of Debug.Log for vectors.
Just debug each dimension. Like:
Debug.Log(my_vector.x);
Debug.Log(my_vector.y);
Debug.Log(my_vector.z);