Search Issue Tracker
By Design
Votes
0
Found in
2018.2.1f1
Issue ID
1074083
Regression
No
Nested object with rigidbody does not execute Rigidbody.MovePosition() when parent object is moved by script
How to reproduce:
1. Download and open attached "BrokenRB" project
2. Load SampleScene and enter Play Mode
3. Observe how Sphere object is moving along the side of Capsule
3. Disable Plane object in Hierarchy
Expected result: Sphere object is moving along the side of Capsule while parent object is falling
Actual result: Sphere object is staying in place attached to the parent object and is not moving
Reproduced with: 2017.4.11f1, 2018.1.9f2, 2018.2.2f1, 2018.3.0a11
Notes: Manually moving parent object "Character Controller" in the Scene works as expected (does not stop movement of child object)
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
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
Resolution Note:
A kinematic rigidbody can only have one target position per physics frame. Each consequent MovePosition/MoveRotation is just overriding the end goal that is applied at the end of the frame. Here we have a conflict really. On one hand, we have use code trying to animate the kinematic sphere, on the other hand, there is a hierarchy induced change because the sphere is parented to a dynamic body. Currently, we resolve this by making it that the hierarchy changes take precedence over anything else.