AI Perception Sight only traces to middle of actor capsule

Hi all!

There is a problem with AI perception Sight which simply uses the target actor location to trace and see if the target actor is visible or not.

The AI trace “origin” itself can be modified in the character blueprint by simply going to the Camera (?!) section of the character BP and modifying the Base Eyes Height. Which is great, since the AI can then look roughly from its head’s position.

But that doesn’t take into account the “destination” of the sight detection trace: Again the AI only traces towards the middle of the target’s capsule. Which in lots of cases is woefully inadequate.

Hence my question: Using blueprints, how can I offset (vertically) the local position the AI uses on a target actor to detect it?

Cheers!

Seith

1 Like

Mmh sorry maybe I wasn’t clear enough. So here it goes:

I’m simply looking for the way to offset vertically the local position which AI perception uses on its target (to detect other pawns).

Please note I’m talking about the position the AI looks AT (eg. the target’s head), not the position FROM WHICH the AI is looking (eg. its own “eyes”).

There’s something called “Point of View Backward Offset” but that’s just an offset for the forward point of detection of the AI. That’s the position of the “eyes” of the AI, not the local point of the target it’s looking at.

And as a reminder I’m looking for a Blueprint solution, not a C++ one. Thank you!

hi @SeithCG

This does seem to be a limitation to the perception system. Even though with debugging on the line of sight appears to be eye level, but when perceived the base of the trigger seems chaaracter midpoint.

You could make youself a similar thing as sight is the only thing this would be affected by, using a trace cone or collision cone or a combination of them both and can entirely be done in blueprints.

Thanks @High500! Yeah it’s astonishing that despite its flurry of excellent options UE5 still fails at basic stuff like that. I saw on the forums that 5 years ago someone from Epic said they would expose this well needed feature to Blueprint but then they must have left the company and nobody followed up.

I suppose anyone who meets this problem would have to code a new class in C++ anyway, and then derive their characters from that class in order to change the location an AI looks at. Oh well…

(Anyone looking for a tutorial about that: Unreal Engine Custom Sight Perception Target- Head - YouTube)

7 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.