I’m making a 2D game and need to dot the contact normals of all the points of contact when my player is getting smushed. When I use the scripting example to draw the contact normals in OnCollisionStay, I see two normals as I expected. In the same chunk of code I put in print(collision.contacts.Length) and it is always 1 (even when debug draw shows 2 contact normals). This one’s got me scratching my head. My best guess is that they’re being processed one after the other or something like that. Is there another way I can do this to have access to both contacts at the same time? Thanks in advanced for the help.
If I’m not mistaken, I would presume that contacts would be on a per-object basis.
If you are making contact with two separate objects at one point on each, you would have two single-element arrays. If you’re contacting a single object in multiple locations (such as nestled in a crevice in a concave collider), then you would have multiple points of contact on a single object, resulting in a multi-element array for that object.