- Home /
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: https://youtu.be/AjVhhqfPiPQ
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.
Answer by FlaSh-G · Sep 11, 2021 at 01:59 PM
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.
Your answer

Follow this Question
Related Questions
Create hinge joint 2D by collision 2 Answers
Want to detect if object is in grid. 1 Answer
collisions will sometimes be detected and sometimes will not 1 Answer
Detecting how much of a Sphere is overlapped 0 Answers
Detect Side of Collision 2 Answers