How do I block off collision?

Say there is a brick wall with items on either side of it. I have a trigger volume (sphere) attached to my player actor. When this volume overlaps with an item, it will be picked up.

Obvious problem is that the object on the other side of the brick wall will also be picked up if the overlap occurs, as said wall does not block the player’s sphere. This problem persists even if I set it to block the sphere’s collision channel (or BlockAll).

I’m guessing that I should be sweeping for pickups instead, but I am lost on how to do it. I’m also wondering why included in OnOverlapBegin()'s parameters is a sweep boolean and a hit result–how do I use those?

Generally, what should I be doing to solve this problem?

if you cant reduce the radius of the sphere, you may need to do another trace based on the spheres results to determine if actually is reachable.

take the hit result, break hit, do a line trace from the players position to the actor pin from the “Location”, but set the line trace to detect the wall, if the resulting vector is >= than the vector to the object set a bool reachable=true, if the vector is shorter reachable=false.

but would really be way simpler to just reduce the spheres radius.

Didn’t follow your instructions perfectly but Line Trace was what I was looking for, thanks. Just curious: How would reducing the radius of the sphere help? Do you mean that as a way to prevent the sphere from going through the wall? I want to be able to pick up everything within a certain radius independent of what blocks my way–it could be a thick wall but it could also be a thin piece of cardboard.

you could put the pickup sphere attached to your item, then just check if it is your player overlapping with it to pick it up.