Add quadratic collision function