`set_v` and `sphere_contacts` could be optimised using a kd tree. May be overkill though, I'm not sure.