Hello,
I have a weird issue that I wonder if anyone else has come across. When setting a transform.postion it’s adding a slight bit extra to the value. For example I set the transform.position to (0,0,12). I get something like (0,0,12.01234…). I capture the value just before I assign it just to make sure my maths is messing things up. But from Devlog(position) to transform.position = position there is an error. It’s weird possibly a bug?
2 Answers
2
Hello.
It’s weird possibly a bug? 99,999% no 
Are you using colliders? Rigidbodies? Any physics? Some Nav Mesh system?
These things can interact with position of a gameobject. You should use something to be sure its not moveing it, each thing have its porperties (Constrain/Kinematic for RB, Speed for NavSys…)
Bye!
It appears there is a floating point error when getting the world position of a child object. Calculating the position by adding the local position to the parent transform position fixes this error.
Further testing as far as when the script ends all the positions are correct it's just the editor that seems to show them slightly mis-aligned
– OwlInTheCupboard