Different vector3 value in inspector and debug console
When I output a vector that is equal to transform.right to the debug console, the value printed is the correct one in world space no matter how the object is rotated.
However, that same vector has a completely different value in the inspector. Here's a screen shot to compare when the object is rotated at 90 degrees clockwise.
http://puu.sh/lCDGr/42be07553b.png
There's not much else going on in the script, especially nothing that is touching that direction vector. I really don't get why the value is different.
Any help would be appreciated, Thanks
I just realized that what's happening is there's inaccuracy for some reason with the value, and so in the debug console it's getting rounded to 1 decimal, and in the inspector it shows a very small value like -3.258414E-07. I understand why that inaccuracy is occurring (because the value of the z and w components of the Quaternion have some inaccuracy). Is there any way to avoid this?
Your answer
![](https://koobas.hobune.stream/wayback/20220612050729im_/https://answers.unity.com/themes/thub/images/avi.jpg)