how we use the navlink, in the crowd simulation.
when i read the code in crowdFollowingComponent. i think because the pathing was handled by detourCrowd. so the information about the segment is being kept in the detour. how we access that?? so we can know. what segment is navlink and in what segment we are. are we have to make a inheritance class from crowd manager to do so??
Segment data is buried deep inside DetourCrowd code and accessing it is quite annoying. Maybe you can use UCrowdFollowingComponent::OnNavNodeChanged() in your derived path following class to react on starting a navlink?
ok. thx for lukasz the problem is solved, but the function is change a little bit, so this is how i solved it ::
ARecastNavMesh* NavMesh = Path.IsValid() ? Cast(Path-GetNavigationDataUsed()) : nullptr;
if (NavMesh)
{
uint16 AreaFlags; // area flags that we define in the NavArea class
uint16 PolyFlags;
//the signature is different in 4.8
NavMesh->GetPolyFlags(NewPolyRef, PolyFlags, AreaFlags);
/// use the AreaFlags, for example compare it with the areaFlags of NavArea class that we use to. i recommend to make some kind of enum of NavArea type that we used. and then compare that to the AreaFlags
if(AreaFlags == <EnumOfNavArea>areaFlags)
{
// do something.
}
}