Line Trace, but check if Capsule is in sight of specific location

Say I have a capsule component for character collision. Now say I have some location in the world that is trying to observe to see if it can spot that capsule (for my case it’s a point light for light detection). Basically, how can I check to see if that point in the world can ‘see’ the capsule? There doesn’t seem to be an easy way to detect this with the normal trace functions. Here’s a rudimentary example (with a horrible paint drawing) where basically you have a black wall, an orange object slightly peeking out, and a blue point that can barely see it, and I want to figure out how to detect that it can see it.

have you looked into pawn sensing and eqs yet? those may help. otherwise id say to go with a multi line trace but that may not be ideal

I have but those are for ai detection, what i’m doing is just a simple “can a light see the collision box of the character” and it’s be weird to have a pawn on a light. Multitrace I don’t think would quite work for that either cause I would still need to trace every single point on the collision to see if I only collide with that.

It’s kind of a weird situation. Maybe explain more why you’d want a “light” to be so specific to see any point on a collision capsule? What are you trying to achieve and why does it need such specificity? That being said you might want to look into making “bones” for your character and you’d have to line trace to each bone and check if one is sticking out, I’ve heard this was used in uncharted for their AI searching, or look into using DOT products as these are typically used to create a “field of vision”

A line trace would work fine for that. Your issue is you want to be able to see ANY point on your character and in order to do that you’d have to break your character up into pieces, you have to use bones or make points on the character you’d want to check if they are sticking out, there isn’t a simple way I know of to do that. The line trace has to “trace” to something so you need to give it a specific point.

Well, maybe not necessarily on the collision capsule, that was more me thinking of optimizations; it’s just for light detection on a character for a horror game, checking to see if point lights are casting on my character, for dynamic lights, since the light values don’t seem to be cached from dynamic lights. I have it just tracing to the character’s location right now but I wanted to try to trace to the whole character possibly for better accuracy (ie: see character’s hand popping out of a shadow). Tracing to bones could work as well maybe for decent results, but I was hoping there was a method to detect if an object is occluded or not from a specific point.

Yea, I was just hoping there was another method beyond the regular traces for that, similar to the rendering scene putting IsVisible on objects if they’re not occluded. Thanks for the help though.