How do I get if a actor is seen by other actor?

If you take a look through the code for UpdateAISensing() in that same component, you can see it using a for loop over all the pawns in the level with GetPawnIterator(), and then it checks to see if that pawn is visible using a line trace.

I’d suggest using UGameplayStatics::GetAllActorsOfClass, or otherwise getting a reference to the particular actor you wish to be ‘sensed’, and perform a line trace between the camera and the target actor. It’s a crude test, but you can assume if the line trace doesn’t hit anything between those two points, that the camera can see the actor in question.

how do I get if a actor is seen by other actor?

I’m trying to make a camera that will shoot an specific actor after seen it

I know that pawnsensing can fire an “onseepawn” event
but It don’t fire on actors that aren’t a pawn

I created a pawn blueprint and copied everything from the original actor to that new pawn and now I can use the pawnsensing

an ugly workaround but it work for now