Search Issue Tracker
Won't Fix
Won't Fix in 2023.1.X
Votes
0
Found in
2020.3.35f1
2021.3.5f1
2022.1.6f1
2022.2.0a17
2023.1.0a2
Issue ID
UUM-768
Regression
No
Assigning transform.position can be inaccurate when the transform's parent is rotated
How to reproduce:
1. Open the attached Project "PositionDebug.zip" and load Scene "PositionDebug"
2. Enter Play Mode
3. Observe the Game View
Expected results: The Cube in the Scene is stationary
Actual results: The Cube is moving
Reproducible with: 2019.4.39f1 2020.3.35f1, 2021.3.3f1, 2022.1.2f1, 2022.2.0a15
Note:
- Issue is dependent on the values of transform.rotation of the parent GameObject and the transform.position of the child GameObject that gets the transform assignment. Not all value combinations will reproduce the issue
- It appears like some value combinations provide more movement than others
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
Due to floating point imprecision there can be a small difference between the global position returned from GetPosition() than that which was set with SetPosition().
The difference depends on the object's specific transform hierarchy and depth.
It is therefore expected that an object might move very slightly when running the script code: "transform.position = transform.position;"
Resolution Note (2023.1.X):
Due to floating point imprecision there can be a small difference between the global position returned from GetPosition() than that which was set with SetPosition().
The difference depends on the object's specific transform hierarchy and depth.
It is therefore expected that an object might move very slightly when running the script code: "transform.position = transform.position;"