Question by
supreethg9 · May 04, 2019 at 11:30 PM ·
collisionarrayoncollisionenter
collision.contacts not working,
im writing code using a tutorial ( at https://www.youtube.com/watch?v=CLxXkSIaOAc ) and i came to a section where i wrote down exactly
void OnCollisionEnter(Collision c) { ContactPoint[] points = new ContactPoint[2]; c.GetContacts(points); for (int i = 0; i < points.Length; i++) { if (points[i].normal == Vector3.up && !groundTouched.Contains(c.collider)) { groundTouched.Add(c.collider); return; } } }
but for some reason, c.GetContacts just didnt work. i reaserched what it did, used substitutes etc but the error had no ryhme of reason. plz help ,
Comment