Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

OnCollisionExit being falsely triggered

Discussion in 'Physics' started by DavidWFVR, Dec 5, 2018.

  1. DavidWFVR


    Dec 4, 2018
    In our project we are seeing OnCollisionExit events whilst colliders are firmly buried in other colliders. This appears to be a problem only when interacting with static mesh colliders. Hitting other primitives does not appear to be causing this issue. We have taken extra care to ensure the meshes we are using are convex and designed in such a way to keep things easy for the Physics system to manage. Replacing these with primitives for approximate collision reporting is not an option.

    Our setup -
    - Rigidbodies are set as kinematic. We are directly responsible for their movement and they are the child of a cursor object which moves through the scene
    This object contains one or more primitive colliders in its hierarchy - Spheres, capsules, boxes etc.
    - PhysicsManager: Contact Pairs Mode is set to Enable All Contact Pairs.

    As far as I'm aware this should be giving us the results we expect, however we're seeing multiple calls to OnCollisionExit and OnCollisionEnter when passing Kinematic rigidbodies through mesh colliders.

    If anyone has any advice it would be greatly appreciated, thanks!