Line Trace for specific class

I am using some abstract class for pickable objects. Because I want to highlight those objects and basically have the information if player sees them I have to line trace against this object - instances of AGameObject class and it’s children.

Here is a thing - I often can have some other objects, not children of AGameObject, blocking my trace. I really don’t want to trace against them. Is there any clever way to get LineTrace function only against AGameObject class (and its children)? For now I am basically using some loop which adds to IgnoredActors array all objects which I found by LineTrace but are not children of AGameObject class.