Can you not create a child of a collision component?

Hi, I’m trying to extend functionality of a collision component (sphere). But I can’t find it in the list of blueprint classes.

Hi,

Hope you’re doing great!

If you’re not seeing the Blueprint version, it’s because classes like USphereComponent, UBoxComponent, and UPrimitiveComponent aren’t Blueprintable by default.

What you can do instead is implement your logic using the overlap delegates directly in a Blueprint Actor.

Alternatively, you can create a custom C++ class that extends USphereComponent. In your subclass, you can bind to the overlap delegates and implement your desired behavior. This also gives you access to helpful functions like GetOverlappingActors, which can make your logic more precise and reusable.

Hope that helps - take care!

1 Like

Thanks. I actually need it for a line trace to check which hit component implements an “interact” interface. None of the delegates are suited for that, unless I’m wrong.
Right now I have the interact interface on the static mesh. I wish there was a way (not C++) to implement that interface on the collision box instead, because it’s cheaper.
I don’t want to dive into C++ for now. I guess I’ll just keep using the mesh.

Oh, I see.

So I suggest you use another approach, very simple actually.

Use the node Does Object Implement Interface, so you can easily check if the actor implements a given interface.

1 Like

Thanks. I was actually doing that but I read that using the actor mesh to check for hit can be more expensive than a collision component. So that’s why I was looking for a way to implement the interface on the collision component instead.