Search Unity

Confused with ContactPoints

Discussion in 'Physics' started by MikeUpchat, Jan 9, 2019.

  1. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    847
    In my OnCollisionEnter method I output all the contactpoints data. I was expecting to see contacts between just the object with the script attached and anything it hits, but instead I also get contacts between other object pairs. Also OnCollisionEnter is being called dozens of times in a frame. Is there a guide to explain the logic behind OnCollisionEnter and how the contactpoints relate to the game object the script is on? How do you go about finding the contacts that only relate to the object my script is on?