added angular factor method for rigid bodies, upgraded ray casting