Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2021.1
2021.2
2021.2.0a17
Issue ID
1338794
Regression
No
Setting physical attributes of a Kinematic GameObject sometimes sets them not equal to the defined values
Reproduction steps:
1. Open the user's attached "DeterministicPhysicsBug2.zip" project
2. Open the "Test" scene
3. Enter the Play Mode
4. Observe the Console
Expected result: The Debug.Logs are printed infinitely
Actual result: An error is thrown after some Debug.Logs
Reproducible with: 2019.4.27f1, 2020.3.12f1, 2021.1.11f1, 2021.2.0a20
Could not test with: 2018.4.36f1 (project cannot be downgraded)
Notes:
-In the Actual results section - the error might be thrown after 10 or after 500 test
-The issue doesn't reproduce consistently
Comments (1)
-
Swarley_92
Jul 28, 2022 11:50
also faced with this bug on 2022.1 Unity
Can't change velocity and angular velocity for kinematic rigid body. By we already have mechanics based on previous rb behaviour. It's a really critical bug for our project
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
The issue was caused by using Vector3.Lerp with Time.fixedTime. During the first run, t that is passed to Lerp is less than 1 thus Lerp returns a point midway between startPosition and targetPosition. All subsequent runs had t > 1, thus Lerp returned targetPosition. Workaround: use a separate variable for time tracking and reset it every run to 0.