#How do I calculate the number of raycasts I need for an NPC’s vision system?
1 messages · Page 1 of 1 (latest)
damn bro idk
shit ur right
"damn bro idk" is the best amount of raycasts
this is unity
not roblox
join @ CAEB
idk how many rays I should put in like a 45 degree area to detect the player
this seems excessive
its not mine I was just giving an example
I know how to do it i just dont know how many
that might be in the hundreds
if I do a hundred raycast every like 0.1 second then thats like a thousand raycast a second
with 100 npc thats lie
100k raycasts per second
yea
its check if the player is in the 45 degree area and within a certain range
if it is
then it raycasts
yes
this is basically the idea
"hearing sight"
smh
my bad
"vision sigh"
smh
my bad
Instead you could make a single raycast fired every .1 secs and each successive ray would be rotated by 1 degree ?
no
👍