- Home /
Figure out a workaround to my problem.
Getting a Raycast to Classify Objects as the Same Thing
The title may be a bit misleading all depending on how you interpret my problem. I'm sending a raycast at an object which has walls between itself and the other object. Whenever the raycast hits the walls a timer is supposed to be added to. I'm checking if it hits the wall with an if statement saying that the hit collider's gameobject tag must equal xyz. The problem is that it will only allow the timer to run if the raycast remains hitting the first wall that it hit, if it hits another wall nothing will happen. I'm pretty sure it's looking for the same object although the collider that is hit next will still meet the same requirements. Anyone know how to fix this?
If you could give a bit code I could help more. Did you make sure that the other wall has the "xyz" tag?