- Home /
2D Collider Ordering Issues Involving Sprite Renderer?
So I'm using a Physics 2D Raycaster alligned with IPointerHandlers and 2D Colliders to interact with objects in my scene. I have many overlapping colliders, so I use the Z axis to get them ordered right.
The problem starts when I try to use this approach with a GameObject that also have a SpriteRenderer attached, in that case the Z axis won't matter, interaction will only happen if the Order In Layer is set to higher than zero. I also tried disabling the Sprite Renderer component aswell, interaction doesn't work, but if I remove it the interaction will work. That's really bugging me out as I can't find any reference to this?
Sorry if I don't seem to be describing the issue well, as this is really very odd for me, anything I forgot just ask me and I'll explain.
Your answer
Follow this Question
Related Questions
Add PolygonCollider2D from code and ignore sprite mesh 1 Answer
Edge colliders not moving with the attached object 0 Answers
2D Colliders stops working at random despite rigidbody, OnMouseDown not called 0 Answers
Collider2D.Cast() Visualization ? 0 Answers
Not sure if I should use UI or SpriteRenderer. need to detect collisions. 1 Answer