Search Unity

Kinematic body only supports Speculative Continuous collision detection

Discussion in 'Physics' started by eron82, Mar 20, 2019.

  1. eron82

    eron82

    Joined:
    Mar 10, 2017
    Posts:
    83
    Kinematic body only supports Speculative Continuous collision detection.

    Speculative Continuous detection is full of bug. Wrong collisions and wrong velocity/rotation detection.

    How can i use the Continuous or Continuous Dynamic with a isKinematic objects? (like in Unity 2017)
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,506
    Kinematic rigidbodies don't react to collisions. In order to ensure other non-kinematic bodies to react properly to collisions with the kinematic body you must move the latest with Rigidbody.MovePosition and Rigidbody.MoveRotation from FixedUpdate. Any other method of moving/rotating the kinematic body won't cause the expected results.

    If you still have issues after the above is verified, then it may be a bug. I'd recommend you to submit a bug report with a simple repro case.
     
  3. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    107
    The same bug in Unity 2019.1
     
  4. V-J

    V-J

    Joined:
    Apr 1, 2015
    Posts:
    73
    bug in Unity 2019.1.13f
     
  5. olonge

    olonge

    Joined:
    Sep 22, 2014
    Posts:
    16
    I had the same issue.

    It was because I was setting an item's RigidBody.isKinematic to true, so that it could be moved by an animation

    Code (CSharp):
    1. rigidbody.isKinematic = true;
    however the items collision detector was set to "ContinuousDynamic", which was not right.
    To address this, I needed to set the Collision detector to "ContinuousSpeculative" before setting isKinematic to true...

    Code (CSharp):
    1. rigidbody.collisionDetectionMode = CollisionDetectionMode.ContinuousSpeculative;
    2. rigidbody.isKinematic = true;