forked from mirror/DotRecast
Avoidance patches
This commit is contained in:
parent
7f1b9e63bb
commit
3157c1e764
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "com.rnd.dotrecast",
|
||||
"displayName": "DotRecast",
|
||||
"version": "0.1.4-exp.1"
|
||||
"version": "0.2.0"
|
||||
}
|
Loading…
Reference in New Issue