Why does the x value read different here?
Vector3 bb = new Vector3(-0.032f, -0.3f, 1.5f);
UnityEngine.Debug.Log("bb field: " + bb.x);
UnityEngine.Debug.Log("bb full: " + bb);
Why does the x value read different here?
Vector3 bb = new Vector3(-0.032f, -0.3f, 1.5f);
UnityEngine.Debug.Log("bb field: " + bb.x);
UnityEngine.Debug.Log("bb full: " + bb);
Since you haven’t actually said what you even think is different between the two, I’m assuming you’re hitting this.
How is it different?
When you call:
UnityEngine.Debug.Log("bb full: " + bb);
bb in this instance is really a call to bb.ToString()
bb.ToString() formats the floats in a manner different than the default float formatting.
So, the value is not different, it’s being formatted for display differently.
thanks! that answers it