Hey, i’m working on a physics pick up system. I’ve had the issue where the player can pick up objects through walls. My attempts to fix this have made it so if the second like trace (which is looking for walls) hits the floor after the object it will count it as a wall hit.
TLDR: I want to check if a line trace hit a wall or phys object first to decide weather an item should be picked up.
trace will just trigger ONLY the first hit.
It seems you wall is not stopping the trace at all…
have you checked your wall settings are fine
generating hit events for your trace?
you using two independent traces? why?
you can create a custom trace channel in project settings…call it
blocker for pickups and set your pickup items AND the ball to block this
channel. so you just use a single line trace filtered with that channel.
The walls should be generating hit events yes, and Im using 2 traces as to filter for objects and one for channels to filter for walls. Ill try the other solution you proposed.
you can filter by using tags.
linetrace everithing and when you have some succesfull hit just check if
the actor or component has some custom tag like ‘pickup item’. if not just ignore the trace.