Physics Raycaster Bug?
Hey!
I am working on a project, where I have four objects on top of each other and I need to be able to interact with them at the same time.
Each of the four objects have layer set to puzzle, box colliders, and a button that listens to IPointerHandlers. See the image below:
Box Collider Applied
The camera has Physics Raycaster component and is looking for the Puzzle layer. The Max Ray Interaction is set to 10.
Camera Has Physics Raycaster with May Ray Interactions at 10.
The problem I face is that no matter how I try, this setup can only handle to top layer and not all four at the same time. My Own Raycaster script can find all colliders with Physics.RaycastAll, but its just not as convinient to use because it cant call IPointerHandlers.
Any suggestions?
Thanks in advance!
Answer by Edeem · Oct 24, 2021 at 01:49 PM
Managed to find a workaround, but I leave the question here, because I still think its a bug with Physics Raycaster.
Your answer
Follow this Question
Related Questions
How to ensure raycasts hit colliders inside of trigger colliders on objects that have a rigidbody? 0 Answers
Cannot figure out how to measure the distance of a raycast being sent out to the side of an object 1 Answer
animator.play() not working anymore 0 Answers
SphereCastAll hit.point are allways zero 1 Answer
Player sticking walking around inside tunnel.. Raycast HOW? 0 Answers