Skip to content

Commit

Permalink
feat(NPCVehicleCognitionStep.cs): add distance-check for prediction-c…
Browse files Browse the repository at this point in the history
…ontrol

Signed-off-by: kazushi67 <[email protected]>
  • Loading branch information
kazushi67 committed Jan 15, 2025
1 parent 60ab38e commit ca7ca7b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,16 @@ public void Execute(
States = states
}.Execute();

foreach (var state in states)
{
if ((state.Vehicle.transform.position - egoTransform.position).magnitude <= 200F){
state.Vehicle.outerControl = true;
} else {
state.Vehicle.outerControl = false;
}
}


Profiler.EndSample();
}

Expand Down

0 comments on commit ca7ca7b

Please sign in to comment.