Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

parented, kinematic rigidbodies moving independently when parent is nudged.

Discussion in 'Physics' started by RedRiverStudio, Aug 23, 2018.

  1. RedRiverStudio

    RedRiverStudio

    Joined:
    Sep 8, 2014
    Posts:
    136
    Make a physics "ground"
    Make a sphere, add a rigidbody.
    Make a box, add a rigidbody, change the flag to isKinematic,disable the collider (effectively making an inert physics object)

    Parent the box to the sphere.

    In play mode, move the sphere around with the transform gizmo, the box will wildly creep from the parent.

    is this intentional?
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Could you file a bug? Child rigidbodies should not be influenced by parent rigidbodies.
     
  3. RedRiverStudio

    RedRiverStudio

    Joined:
    Sep 8, 2014
    Posts:
    136
    I was expecting the child rigidbody to be 100% influenced by the parent when isKinematic. This is a recent bug when upgrading from 2018.1.5 to 2018.2

    bug is being filed.
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It probably should be affected by the parent in that case.
     
  5. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,478
    A Rigidbody component takes over its GameObject's Transform. As for what I can tell, child rigidbodies aren't intended to be affected by their parents in any case. If that happens (child rigidbody being affect by its parent) then it's a bug.

    Please check out this thread:
    https://forum.unity.com/threads/wha...-my-entire-game-with-child-rigidbodies.544985

    From my reply in that thread:
    This explains why are you observing different behaviors among different Unity versions. The correct behavior is the child rigidbodies being independent of their parents.
     
  6. RedRiverStudio

    RedRiverStudio

    Joined:
    Sep 8, 2014
    Posts:
    136
    Unity has reported that it is, in fact, a bug, and will be resolved in 2018.3. The behaviour starts in 2018.1.6. Rigidbodies should behave independently of their parents, UNLESS they are checked as IsKinematic, then they are basically inert.
     
  7. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,478
    Where is that stated? As far as I understand, a kinematic rigidbody is static in the scene independently of any parent rigidbody. Kinematic rigidbodies should be moved via MovePosition and MoveRotation in order to interact correctly with other physics elements.
     
  8. baumxyz

    baumxyz

    Joined:
    Mar 31, 2017
    Posts:
    107
    Having the same issue with 2018.2.14f1.
    Is there a workaround or something?
     
  9. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    178
    I hit this recently. Try changing the Interpolation of the child kinnematic rigidbody to None. I know it would seem that should not matter. Also I have not been able to establish if AutoSync and SyncTransform should affect kinnematic rigidbodies. It would be useful to know!