collision detection, and npc