How to detect walls in angry bird

Hi!
I’m correctly working a game similar to angry birds. But i encountered a little problem. my player would go trough the walls while dragging. that’s actually a HUGE problem; cause if the player, go through a wall while dragging, It would get stock behind the wall.I can make the player be able to go pass the wall like when it was while dragging but I don’t want that. I want the player wouldn’t be able to go through walls in the first place. I have absolute no idea how to do that. So I would be really grateful if someone help me with it.

link: Problem - YouTube

also I followed BRACKEYs tutorial on how to make angry birds in unity and I’m pretty sure the box colliders are always active and fine.

Raycast from the origin position of the bird to the position it is being dragged to. If the raycast hits something, put the bird where the hit position is instead of the touch position.