OverlapBox is not detecting all objects inside it.
Hi guys,
I have an issue with my OverlapBoxes not detecting all objects inside it.
All cylinders in the image are instances of the same prefab. Their material is changed from the default grey to the red one when they are detected by the OverlapBox script call.
There is 4 OverlapBoxes called, one for each vertical 'physical' box you see in the image.
Using the following script for the overlapboxes. (There's leftover trigger colliders in the boxes, I use them for the bounds currently.
bounds1 = collider1.GetComponent().bounds; bColl1 = Physics.OverlapBox(bounds1.center, bounds1.extents, collider1.transform.rotation, m_LayerMask);The instances are in the correct layer, they have a rigidbody and a mesh collider.
I'm really at a loss here, so any help is appreciated. If more information is needed, don't hestitate to ask.
Your answer
Follow this Question
Related Questions
Rigidbody randomly going through collider 1 Answer
Why is my trigger collider acting like a normal collider? 1 Answer
Very confused... Physics.OverlapSphere working, but not NonAlloc version? 2 Answers
Physics.OverlapSphere not detecting collision! Collision help. 1 Answer
Collision with children of rigid bodies. 0 Answers