Question by
RemDust · Sep 06, 2021 at 01:46 PM ·
collidercoordinatesraycasthit2d
Get 2 points of certain part of Edge Collider 2D
Hey guys, I'd like my enemy to get automatic coordinates for a segment of the edge collider 2d he is on. Please see image below. I suppose I need to raycast on the ground to get the collider on hit, but then how can I get the previous and next point in world coordinates ? The hit won't actually create a collider point that I can count on to get my points :/
Any help would be appreciated =)
detect-ground-coordonates.jpg
(269.8 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613042643im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Gap between colliders stopping hit.collider.tag from working 0 Answers
Raycast collisions being detected along a non-existent curve(?) 1 Answer
Only the very first if statement actually works 1 Answer
How can I check whether my Ray is hitting an edge collider or not? 0 Answers
How to make the character roll and also resize the collider? 0 Answers