- Home /
Prevent corner cut with diagonals
Sorry for the title but the Website told me to be specific and I always have some problems with making understandable what I mean not having more than one sentence ^^ (I know, thats bad) I'm currently working on my Pathfinding Asset (this one) but what I have different here is that I don't use a navmesh, my Pathfinder "sees" it's environment without calculating it before. Therefore I create knots and check if something is in between of them
Works perfectly. But now I'm creating ramps where I only tell my knots what their distance to the ground should be
(Imagine for the picture that the elevation can be anything, |K1K2| = |K2K3|, |GroundK1| = |GroundK2| = |GroundK3|) Yes, I can solve it by a layermask but I don't want to do that because I don't want to tell the user to put every ground gameobject into another layer. I myself found a few complex possibilities how I could avoid this problem but I don't like them because they seem "unstable" to me. If you have an idea what I could do, from that you think that it is an efficient way of doing it, please tell me.
Answer by screenname_taken · Jun 10, 2014 at 07:08 AM
Try using raycasting first, from one point to the other. If it returns anything else, then it's blocked.
Your answer
![](https://koobas.hobune.stream/wayback/20220613151216im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
I made a better shader how do i fix[add _Shadow Strength]help???>Sorry that im asking for to much 1 Answer
Why the UV maping in 3DWings cant be seen in Unity? 0 Answers
My enemy keeps floating in mid air and need help raycasting! 0 Answers
What's the best way to optimise thousands of instances of the same mesh? 2 Answers