What does ModifiableContactPoint.Index represent?

I am working with extracting contact data Unity Physics’ collision system so every piece of information I can get out of ModifiableContactPoint/ ModifiableContactHeader is essential for my usecase. I am curious what exactly ModifiableContactPoint.Index represents (what specifically is it an index for)?

See com.unity.physics\Unity.Physics\Dynamics\Simulation\IContactsJob.cs

        /// Index of this point, within the ModifiableContactHeader
        public int Index { get; internal set; }

A contact can be made up of multiple points. E.g. a cube lying on one face on a flat plane would have 4 points making up the contact between plane and cube.

1 Like