Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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,430
    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;