Search Unity

Question About NavMesh.Raycast in Unity 2019.4.8 and later

Discussion in 'Navigation' started by m_funakoshi, Dec 23, 2020.

  1. m_funakoshi

    m_funakoshi

    Joined:
    Dec 22, 2015
    Posts:
    1
    Probably from the resolution of this issue, NavMesh.Raycast when used in 2D has been inconvenienced.

    https://issuetracker.unity3d.com/is...312.740019049.1608599606-141659247.1591584658

    I was using NavMesh.Raycast to determine movement over short distances, which was working fine, but an update to Unity changed the behavior.

    Specifically, I used to be able to get a break in the NavMesh, but now I can't go beyond one boundary in the mesh.

    I'm having a hard time determining if this is a problem that is occurring because I'm using it in 2D.

    If it's just movement, I can use NavMesh.CalculatePath or something similar, but I can't get RaycastHit.normal and am struggling to calculate reflections.

    This is an irregular way of using the process for AI, but I would appreciate your comments and suggestions.

    Attached below are screenshots of the same program running in Unity 2019.4.2 and Unity 2020.2.0.

    Unity2019_4_2.png Unity2020_2_0.png