How make enemy player see your character only in range of sight?

How make enemy player see your character only in range of sight? For example with circle range of sight or linear depending on blocking objects. In some games this is just part of fog of war.

Hi!

If you want, what you pawn can “see” and “hear”, you need add Pawn Sensing component. This a simpley tutorial about sensing. Sensing is a part of AI System.

ty, it’s really cool component doing half the job, but i still don’t know how:

in multiplayer make your pawn invisible for enemies untill they see you?

That is exactly what it does.

Use it on my turrets?

Can you expand?

Hi

When you set up sensing, you dictate the cone of reference.

With this video, you can see when it sees me and turn, also when I shoot it it turns.

In regards to each player, you could put up a Bool or gate to see which player gets detected.

Not really, just to clarify things lets break “see” into 2 states:

see as “in range of sight”, that depend on pawn turn, just check

and

pawn invisible (on screen!) as pawn state for you untill you look at him, for example in real world you can’t see what behind you, right? more specific example - we have players A B C

A stay behind B, B stay behind C, so in this case

for C - A and B should be invisible
for B - A should be invisible, but C visible
for A - B and C should be visible

hope now you got what i asked for - i don’t have idea how make pawn invisible (on screen) for each player based on sense, svv3dUDN only gave me solution how check if one pawn look at direction of another

now i don’t have a problem with checking “is pawn in direct range of sight”, i just don’t know how make same pawn visible for one player and in same invisible for other, here’s just image with 2 players on different PC (it’s not a splitscreen example)

so how can i achieve this? how make one pawn’s static mesh visible for yourself and invisible for others on condition? is here any function like “set pawn static mech visibile for player”?

hope now with image example you understand me :3