Raycasting doesn't work

i tried to make NPC chase the player when seeing them, but it doesn’t work

This is not how conditions work at all. Each condition is a test which will STOP the event from continuing if it fails. So in this case the event will only happen if the object (sight block) is found at angles 0, 50, 90, 130, 180, 210, 270, and 310, all at the same time. In other words it would have to be overlapping NPCs.X/Y

Also, I’m not sure if this is intended, but no npc_test were picked. This means the action will work on all npc_test in the scene.

1 Like

You don’t need to send rays in every direction since you know where the player is.
You should take a look at this example:

thx, i solved the main problem, and there’ll be no other NPC tests so no problem with it

thx, it now works very good and how i wanted it to ^^