Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[SOLVED] NavMesh.Raycast() catches vertice, thought was catching tile edge :P

Discussion in 'AI & Navigation Previews' started by Deleted User, Nov 11, 2016.

  1. Deleted User

    Deleted User


    EDIT: my mistake, its NavMesh.Raycast not NavMesh.FindClosestEdge()

    seems like NavMesh.Raycast() finds NavMeshSurface Tile Edges??, can it not?

    is it possible for NavMesh.Raycast() to NOT detect tile edges??
    or is that not what is happening?
    and instead the NavMesh iam using has like a microscopic edge at the problem vertice?

    i want the green path in 2nd image, not the red path,
    NavMesh.Raycast() seems to be detecting that white tile edge line as an edge
    or is it a microscopic edge at the vertice?

    This is my navmesh (graphical assets hidden cause iam a nerd :p lol )
    it gets that vertice on the bottom .. or the white line?

    and this is the erroneous behavior.. i want green path, not red path
    Last edited by a moderator: Nov 11, 2016
  2. Deleted User

    Deleted User


    or durrr i can NavMesh.Raycast() from an offset position (instead of 0,0 of the Agent)

    imma try and see if it still messes up

    LOL yeah the raycast was catching the vertice not the white line
    SOLVED!! :p

    .. thought was the new white tile edge thing, and out of my control, guess not :p
    Last edited by a moderator: Nov 11, 2016