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.
answered Aug 16 '15 at 07:29 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here