DtObstacleAvoidanceParams.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. namespace DotRecast.Detour.Crowd
  2. {
  3. public class DtObstacleAvoidanceParams
  4. {
  5. public float velBias;
  6. public float weightDesVel;
  7. public float weightCurVel;
  8. public float weightSide;
  9. public float weightToi;
  10. public float horizTime;
  11. public int gridSize;
  12. /// < grid
  13. public int adaptiveDivs;
  14. /// < adaptive
  15. public int adaptiveRings;
  16. /// < adaptive
  17. public int adaptiveDepth;
  18. /// < adaptive
  19. public DtObstacleAvoidanceParams()
  20. {
  21. velBias = 0.4f;
  22. weightDesVel = 2.0f;
  23. weightCurVel = 0.75f;
  24. weightSide = 0.75f;
  25. weightToi = 2.5f;
  26. horizTime = 2.5f;
  27. gridSize = 33;
  28. adaptiveDivs = 7;
  29. adaptiveRings = 2;
  30. adaptiveDepth = 5;
  31. }
  32. public DtObstacleAvoidanceParams(DtObstacleAvoidanceParams option)
  33. {
  34. velBias = option.velBias;
  35. weightDesVel = option.weightDesVel;
  36. weightCurVel = option.weightCurVel;
  37. weightSide = option.weightSide;
  38. weightToi = option.weightToi;
  39. horizTime = option.horizTime;
  40. gridSize = option.gridSize;
  41. adaptiveDivs = option.adaptiveDivs;
  42. adaptiveRings = option.adaptiveRings;
  43. adaptiveDepth = option.adaptiveDepth;
  44. }
  45. };
  46. }