#Help with AI PathFinding Raycasting Vision

1 messages · Page 1 of 1 (latest)

turbid void
#

Hello I'm here AGAIN to ask for help, ok first of all the vision of the NPC is fucked up, I just can't make it be good, sometimes the NPC is just blind and sometimes he has eyes in his back>

Yeah I saw tutorials on youtube, but I just can't figure out how to make this thing be good, I just want to make the NPC has a regular vision, but I SUCK at scripting.

Here are some videos that I made trying to make it be right.

dense fractalBOT
#

studio** You are now Level 11! **studio

turbid void
austere marlin
#

look into dot products

#

tells you how much of a vector is in another vector

#

like this if you dont understand

#

you can do smth like ```
-- unit is the vector but normalized; no value will be less than -1 or greater than 1

line = (monsterhead.position - humnanoidrootpart.position).unit
direction = monsterLookVector.unit

if direction:Dot(line) > .9 then
-- your code here
end