add wraparound support to C2 physics