Fix problem running on simulator
Some basic collision detection.