Add NavCrowd for navigation steering behaviors system for a group of agents

This commit is contained in:
Wojtek Figat
2022-06-26 15:23:36 +02:00
parent 787d788055
commit 982accde6d
6 changed files with 249 additions and 2 deletions

View File

@@ -25,6 +25,11 @@ namespace
Array<NavMeshRuntime*, InlinedAllocation<16>> NavMeshes;
}
NavMeshRuntime* NavMeshRuntime::Get()
{
return NavMeshes.Count() != 0 ? NavMeshes[0] : nullptr;
}
NavMeshRuntime* NavMeshRuntime::Get(const StringView& navMeshName)
{
NavMeshRuntime* result = nullptr;
@@ -100,7 +105,7 @@ Color NavMeshRuntime::NavAreasColors[64];
bool NavAgentProperties::operator==(const NavAgentProperties& other) const
{
return Math::NearEqual(Radius, other.Radius) && Math::NearEqual(Height, other.Height) && Math::NearEqual(StepHeight, other.StepHeight) && Math::NearEqual(MaxSlopeAngle, other.MaxSlopeAngle);
return Math::NearEqual(Radius, other.Radius) && Math::NearEqual(Height, other.Height) && Math::NearEqual(StepHeight, other.StepHeight) && Math::NearEqual(MaxSlopeAngle, other.MaxSlopeAngle) && Math::NearEqual(MaxSpeed, other.MaxSpeed) && Math::NearEqual(CrowdSeparationWeight, other.CrowdSeparationWeight);
}
bool NavAgentMask::IsAgentSupported(int32 agentIndex) const