I’m trying to get the velocity of the collider but getting an error? How can I do this?
Try using:
if (colInfo.collider.GetComponent<Rigidbody2D>())
rb.velocity = ((rb.velocity) / 2) + colInfo.collider.GetComponent<Rigidbody2D>().velocity;