Snap the point to the edge of bounds
Does anyone know how to move the hit point by raycast to the edge of bounds ? I tried ClosestBounds and Closestpoint but it doesn't give the position i wanted.
example:
Black arrow is the raycast. red circle is the point. I want to move it to the position of the green circle.
wew.png
(9.0 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612082913im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Physics2D.Raycast from Collider edge hitting self? 0 Answers
Object Conformity 0 Answers
Edge collider BoxCast issue 0 Answers
how to check if an object is betwen enemy and player 1 Answer