2D working, 3D in progress
Improvements to ball2d and ball3d