completed physics code and box ray hit test