Search Issue Tracker
Fixed in 5.0.2
Votes
0
Found in
5.0.0f4
Issue ID
690124
Regression
No
MovePosition: gravity moves transform, not rigidbody
To reproduce in the attached project:
1) Play the "mainscene" scene in the "Assets" folder
2) Make sure the "Do Null Moves" box on the Player script (on the Player gameobject) is unchecked.
3) Once gravity has moved the player down to the platform, use the left and right arrow keys to move the Player via MovePosition.
4) Observe the buggy behavior -- the Player's sprite will penetrate the platform by about 1 frame's worth of gravity. The penetration is not cumulative, and corrects one frame after letting up on the movement keys (probably as the transform used for rendering resyncs with the Rigidbody's position)
5) Replay the scene from the start, this time checking the "Do Null Moves" box. This will make it so that MovePosition will be called even if there is no movement needed (the Player will simply do MovePosition to the rigidbody's current position).
6) Note that the player is perpetually one frame's worth of gravity BELOW its starting position. The fact that the Player is not consistently moving DOWN indicates that gravity is moving the TRANSFORM of the Player, but not the rigidbody*. This behavior is potentially responsible for the penetration (and delayed correction) produced in steps 1-4. This shows that the behavior has nothing to do with collision (since steps 5-6 do not produce any collisions).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Small rectangles appearing in the corner of title text in Editor when System Font and Bitmap are selected in preferences
- The shortcut character is typed into the name field when a [Shift + <any alphanumeric key>] shortcut is used to create the asset from "Asset/Create"
- TextMeshPro ligatures broken when Font Style setting is changed from “Lowercase” to “Uppercase”
- Standalone Windows Build does not include PDB files for native plugins when "Copy PDB files" option is checked in the Windows Build Profiles tab
- The Unity Version Control window refers to Explorer instead of Finder when running on macOS
Add comment