Physics2D.Raycast from Collider edge hitting self?
I know this has been asked before, but I would like to know if that's a fixable problem? Casting a ray away from a 3D collider starting at it's edge is no problem, the result is a different collider if there is any. Starting the cast from a 2D collider (in my case a BoxCollider2D) however always hits itself.
I tested scaling the collider down and came to a value of 0.99999997f to be the last value the cast works with. Any higher and it hits itself
I guess it has something to do with floating point precision or collision skin, but why is this different from 3D colliders? Could this behaviour be matched so both act the same?
Your answer
Follow this Question
Related Questions
Physic2D and Raycast2D on 3D Colliders problem... 0 Answers
How do you make one game object follow the shape of another game object? 0 Answers
How to get my `collider2D.cast` work? 1 Answer
2d Tilemap collidor not working 0 Answers
How to ensure raycasts hit colliders inside of trigger colliders on objects that have a rigidbody? 0 Answers