CrowdAgent MaxAcceleration, MaxSpeed 설정 가능하도록 수정.

This commit is contained in:
jgkim 2023-06-22 06:44:09 +00:00 committed by Ikpil Choi
parent ddf0cc4e26
commit f11d5945a5
3 changed files with 8 additions and 2 deletions

View File

@ -214,8 +214,8 @@ public class CrowdTool : IRcTool
DtCrowdAgentParams ap = new DtCrowdAgentParams();
ap.radius = _impl.GetSample().GetSettings().agentRadius;
ap.height = _impl.GetSample().GetSettings().agentHeight;
ap.maxAcceleration = 8.0f;
ap.maxSpeed = 3.5f;
ap.maxAcceleration = _impl.GetSample().GetSettings().agentMaxAcceleration;
ap.maxSpeed = _impl.GetSample().GetSettings().agentMaxSpeed;
ap.collisionQueryRange = ap.radius * 12.0f;
ap.pathOptimizationRange = ap.radius * 30.0f;
ap.updateFlags = GetUpdateFlags();

View File

@ -127,6 +127,9 @@ public class RcSettingsView : IRcView
ImGui.SliderFloat("Radius", ref settings.agentRadius, 0.1f, 5f, "%.1f");
ImGui.SliderFloat("Max Climb", ref settings.agentMaxClimb, 0.1f, 5f, "%.1f");
ImGui.SliderFloat("Max Slope", ref settings.agentMaxSlope, 1f, 90f, "%.0f");
ImGui.SliderFloat("Max Acceleration", ref settings.agentMaxAcceleration, 8f, 999f, "%.1f");
ImGui.SliderFloat("Max Speed", ref settings.agentMaxSpeed, 1f, 10f, "%.1f");
ImGui.NewLine();
ImGui.Text("Region");

View File

@ -10,6 +10,9 @@
public float agentMaxClimb = 0.9f;
public float agentMaxSlope = 45f;
public float agentMaxAcceleration = 8.0f;
public float agentMaxSpeed = 3.5f;
public int minRegionSize = 8;
public int mergedRegionSize = 20;