Does having two collision components on one actor cause conflicts? Please read below for more info (lots of questions)

All C++ (No Blueprint pls)
…to be more specific, I have a pickup class that has two USphereComponents (and one mesh), one which is slightly bigger then the pickup and the other which is much larger, giving it a radius (this one is going to be used as a trigger). My goal is to create a system that when you collide with the first big collider, an event will happen where the pickups will “fly” towards the player (like in Ratchet and Clank), and when the smaller collider comes in contact with the player, it them destroys. My mesh component is the root, and i’m assigning my HealthSMCollider->AttachTo(HealthSMMesh) so that it become a child. However, for the GravityRadius (bigger collider) i didn’t set it so that it becomes a child, its just a default subobject, why is it parented?

My pickups also have some physics enabled, when spawned they will give a random radial impulse and impulse force up. When I tell my character to ignore this collision preset(only for the GravityRadius collider) it also disables physics, and it seems to ignore the collision on the smaller collider too the one meant for the player to collide with so it can be picked up) Is this caused because it is a child of the mesh, where my other small collider is as well? Or because it is bigger and anything inside is also ignored as well.? In a nut shell, I want my character to ignore the big collider to prevent it from picking it up from such a far distance (but still be able to play events like it flying to the character) so that it does not pick it up until the player collides with the smaller one, it doesn’t look right when the player can collect a pickup from 10 feet away. All help is appreciated and if you need me to elaborate more let me know, super super tired at the moment I may have forgotten something, thanks.

EDIT*
I’ve found another way to accomplish what I’ve set out to do, which is telling the pickup to find the distance of the player when spawned, and after a two second countdown, it will “fly” towards the player. Which would not require another collider on the same pick up. However i’d still like to know why this is happening ^^^^^^^^^^.

Hello Chriis,

You’re likely on the right track and it may be caused by the hierarchy. In this situation however, I would suggest making an Actor Component for the 2nd collision (the GravityRadius) and setting up the logic for it in there. This will also be useful in the future if you make other pickups as you’ll be able to just apply that component to any pickup you want and it’ll automatically have the functionality.

I’m gonna test out trying to do something similar with just the two spheres real quick though and see if I run into the same thing.

Yes that could also work, thank you. And if you’ve tested it out yet i’d like to know the outcome please

that makes sense, thank you very much

I’m having trouble getting the same thing to occur but I believe part of the issue could be that you’re using OnActorBeginOverlap for your delegate binding instead of OnComponentBeginOverlap for each component. In this case, I believe that no matter what component your character overlaps, as long as it’s part of that actor, it’ll count as an overlap and call both of those functions sequentially. You would do something along the lines of:

GravityRadius->OnComponentBeginOverlap.AddDynamic

and

HealthSMCollider->OnComponentBeginOverlap.AddDynamic