NPC Update: It sees you

5 Likes

uh isnt it kinda big maybe make it smaller and it will give it a better look

make it bigger, you say? Can do

NO don’t you will than make the game break prob

Nice! This is a good feature. Good job on it!

2 Likes

I was joking lol, and I doubt making the view cone bigger will break anything. It doesn’t do anything except turn green.

The actual line of sight for the NPC is determined by a raycast coming into contact with the player if they’re within a certain distance and Vector3:Dot range of the NPC, if theres no obstacle in the way.

The size of the cone is almost the same as the NPC’s FOV, and FOV is so big because I’m making it for a first-person game. I want enemies to be able to see the player from a large distance because it would work well for ranged combat.

If they can only see the player from 30 studs away, they can only begin moving toward/shooting at them from that far, which would make for pretty lousy firefights lol

1 Like