Vixen
02b45cc4
csharp
public readonly record struct LocalAvoidanceSettings

How hard an agent tries to do each of the things avoidance is trading off.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Properties with initialisers rather than positional parameters with defaults, because new LocalAvoidanceSettings() on a positional record struct calls the struct's own parameterless constructor and zeroes everything — the defaults written beside the parameters would never be applied, and an agent whose avoidance weights are all zero avoids nothing. still means all-zero, which is why LocalAvoidance treats it as "use the defaults".

Fields and properties (7)

  • public float TimeHorizon

    How far into the future a collision is worth avoiding, in seconds.

  • public int Rings

    How many speeds to sample.

  • public int Samples

    How many directions to sample at each speed.

  • public float DesiredWeight

    How much the agent wants to keep going where it was going.

  • public float CurrentWeight

    How much it wants to keep doing what it was doing. Damps dithering.

  • public float TimeWeight

    How much it wants to not hit anything.

  • public float SideWeight

    How much it prefers the side the encounter is already leaning towards. This is what stops two agents meeting head-on from both stepping the same way for ever.

Methods (1)

  • public LocalAvoidanceSettings()

    The defaults.

Used by (2)

  • CrowdVixen.Navigation
  • LocalAvoidanceVixen.Navigation