I’m making a 2d game with 3d objects. I have a raycast facing towards the camera for a wall layer. I also have another raycast facing away from the camera to do the same for walls on that side. However, the raycast detecting walls towards the camera returns true when there is a wall behind it for some reason. It shouldn’t return true since the raycast direction is not colliding with any wall.
Here is the raycast code.