Page MenuHomeFeedback Tracker

SampleNavmeshPosition does not work right
New, UrgentPublic

Description

Function SampleNavmeshPosition

GetGame().GetWorld().GetAIWorld().SampleNavmeshPosition(position, 1, m_NavmeshPosition);

Does not work right, for example, when you trying to make bot go to position and geting path using SampleNavmeshPosition, and if there is an obstacle in front of it, he will still try to walk forward, instead of walking around it, as zombies do.

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Create entity/bot with the ability to run/walk to a selected position and use this type of code

/**@fn		GetNavmesh
 * @brief 
 *
 **/
vector GetNavmesh( vector Position, float Radius = 1 ) 
{ 
     vector Navmesh;

     bool IsNavmesh = GetGame().GetWorld().GetAIWorld().SampleNavmeshPosition( Position, Radius, Navmesh );
     if (IsNavmesh)
          return Navmesh;

     return Position;
}
void OnUpdate(...) 
{
     DoMove(GetNavmesh(DestinationPosition));
}

Event Timeline

mov3ax created this task.May 30 2019, 6:30 PM
mov3ax updated the task description. (Show Details)May 30 2019, 7:43 PM
mov3ax edited Steps To Reproduce. (Show Details)Jun 3 2019, 1:09 PM
mov3ax edited Steps To Reproduce. (Show Details)Jun 3 2019, 2:20 PM