Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  3. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

OnCollisionExit being falsely triggered

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

  1. DavidWFVR

    DavidWFVR

    Joined:
    Dec 4, 2018
    Posts:
    1
    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!