fixed raycast rotation bug. Now the npc movement logic needs to be finished.