Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.3.13f1
2020.2
Issue ID
1262009
Regression
No
GameObject with no Rigidbody starts rotating when it's rotation is getting set to the same Quaternion.Euler value on Update
How to reproduce:
1. Open the attached project "colliderBug.zip"
2. Open the "SampleScene" Scene
3. Expand the "Group" GameObject in the Hierarchy window
4. Expand both "Sphere1" and "Sphere" GameObjects in the Hierarchy window
5. Select the "SpikeNoRig" GameObject in the Hierarchy window
6. Observe the selected GameObject's Transform Component in the Inspector window
7. Enter Play Mode
8. After 5-6 seconds repeat the 6th step
Expected result: Transform Component's rotation remains (-90, 0, 0)
Actual result: Transform Component's rotation keeps changing on the X-axis, while rotation on the Y-axis is set to 90 and to -90 on the Z-axis (Might be -90 on the Y-axis and 90 on the Z-axis on 2020.1, 2020.2)
Reproducible with: 2018.4.27f1, 2019.4.9f1, 2020.1.4f1, 2020.2.0b2
Notes:
- The issue is also reproducible when the GameObject's rotation is getting set to the same Quaternion.Euler value on FixedUpdate
- "SpikeRig" GameObject is identical to the "SpikeNoRig" GameObject, it just has a Rigidbody Component with "Is Kinematic" property set to True, which gets rid of the issue
- The changing rotation of the "SpikeNoRig" GameObject also has an effect on the parent "Sphere1" GameObject's Transform Component
- The issue is not reproducible if the rotation is set to a Vector3 value instead of a Quaternion value
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
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
Resolution Note:
The rotation is a quaternion and requires a threshold check to verify if the change is more than the epsilon used in the physics engine when used within Update.