- Home /
I think I broke Unity transform.position
https://www.youtube.com/watch?v=sQdlcpmrN_U
In the video about, take notice how the initial position is -1.192093e-07 but then typing in that same value manually moves it to a different location int the game world. And then typing in 0 puts it where it should be.
This is causing all kinds of issues in my game and I suppose I need a better understand of what's happening here. Thank you in advance.
You posted that video already in a comment on your other question and I gave you an rough explanation there... Eno-Khaon gave you already a more detailed answer and Hellium suggested to use Vector3Int. However messing around with worldspace positions of an object that is a child of another one will never give you a stable result as the world space position is calculated from the transform hierarchy.
Thank you for the response! I'm actually aware of the scientific notation but I wasn't aware of what was causing this to begin with. Just trying to give people something to correct so they can provide the rest of the picture.
https://jussiahola.medium.com/cunninghams-law-and-human-motivation-d88063fdc098
Answer by tyruji · Jul 05, 2021 at 10:43 PM
Don't worry, nothing has been broken here. The problem is that -1.192093e-07 is NOT the same as -1,1920. See that e? It means that the number before e is multiplied by 10 ^ (next number), and in this case this will be a very low value, something about -0,000000192093, which is pretty close to zero, that's why setting it to 0 looked like you changed it back to default. Hope I helped somehow, good luck.