forked from bit/DotRecastNetSim
CrowdAgent MaxAcceleration, MaxSpeed 설정 가능하도록 수정.
This commit is contained in:
parent
ddf0cc4e26
commit
f11d5945a5
|
@ -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();
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue