Avoidance patches

This commit is contained in:
wrenge 2024-04-22 15:31:22 +03:00
parent 7f1b9e63bb
commit 3157c1e764
3 changed files with 7 additions and 1 deletions

View File

@ -1141,6 +1141,9 @@ namespace DotRecast.Detour.Crowd
for (int j = 0; j < ag.neis.Count; ++j)
{
DtCrowdAgent nei = ag.neis[j].agent;
if(!nei.option.contributeObstacleAvoidance || nei.option.obstacleAvoidanceWeight < ag.option.obstacleAvoidanceWeight)
continue;
_obstacleQuery.AddCircle(nei.npos, nei.option.radius, nei.vel, nei.dvel);
}

View File

@ -53,6 +53,9 @@ namespace DotRecast.Detour.Crowd
/// [Limits: 0 <= value < #DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS]
public int obstacleAvoidanceType;
public bool contributeObstacleAvoidance;
public float obstacleAvoidanceWeight;
/// The index of the query filter used by this agent.
public int queryFilterType;

View File

@ -1,5 +1,5 @@
{
"name": "com.rnd.dotrecast",
"displayName": "DotRecast",
"version": "0.1.4-exp.1"
"version": "0.2.0"
}