Part 2.3: Finished fixing collision detection