void HandleCollision(Vector3 a, Vector3 b) { Debug.Log("COLLISION DETECTED"); velocity.x = cb.vix; velocity.y = cb.viy; normal.x = b.y - a.y; normal.y = -(b.x - a.x); reflected = Vector3.Reflect(velocity, normal); cb.vix = -reflected.x * 3 / 4; cb.viy = -reflected.y * 3 / 4; cb.MoveCannonball(); }