Use spatial hashing for collision detection