Get overlapping scene components?

Hi,

I’m adding scene components to my actor. I’m trying to get an array of them using an overlapping collision sphere or similar.

Does anyone know how?

I’ve tried the usual overlap events, but they only seem to return primitive types. Alternatively, can I add a collision sphere to my scene component?

Thanks for any help.
Dave

Hey Dave. Sorry you haven’t gotten a response, but for the people that end up finding this here is the answer:

The short answer is that you cannot directly detect overlapping Scene Components (USceneComponent).

The long answer is that detecting overlapping components requires the use of the physics system for collision, which is barely implemented in Scene Components. The highest level components in the object hierarchy that include collision are Primitive Components – a direct child of Scene Component – which is why they are the returning values from the overlap events, as you have noticed.

As for a workaround, the only ones I know of would be to either a) replace your scene components with small overlapping colliders, such as small Sphere Components, to detect overlap or b) get the component bounds of your overlapping sphere or box (can’t be a capsule for this method, since the bounds returns a bounding box origin and extents as well as a bounding sphere radius) and then explicitly check if the scene component transforms lie within the bounds of the collider.

I ran into this issue my self, so if anyone else knows of other solutions I would also love to hear them. Hope that helps.