Class BumpStop
Progressive spring + damping force near suspension travel limits. Resists bottoming (compression) and over-extension (droop) past per-side activation thresholds.
Namespace: NWH.WheelController3D
Assembly: NWH.WheelController.dll
Syntax
[Serializable]
public class BumpStop
Fields
| Edit this page View SourcecompressionActivation
Compression value (0-1) at which bump stop begins to engage. Below this value, bump stop provides no force. Typical values: 0.80-0.90 (engages in last 10-20% of travel).
Declaration
[Range(0.5, 0.95)]
[Tooltip("Compression threshold (0-1) where bump stop activates. 0.85 = last 15% of travel.")]
public float compressionActivation
Field Value
| Type | Description |
|---|---|
| float |
compressionDamping
Damping rate applied when compression bump stop is active [Ns/m]. Provides velocity-dependent resistance to absorb impact energy.
Declaration
[Tooltip("Damping rate when bump stop active [Ns/m]. 0 = spring-only bump stop.")]
public float compressionDamping
Field Value
| Type | Description |
|---|---|
| float |
compressionEnabled
Enable compression bump stop. Additional force applied when suspension compression exceeds the activation threshold.
Declaration
[Tooltip("Enable bump stop force when suspension approaches full compression.")]
public bool compressionEnabled
Field Value
| Type | Description |
|---|---|
| bool |
compressionMaxForce
Maximum force the compression bump stop can apply in Newtons [N]. Should be 2-5x the spring maxForce to effectively prevent bottoming.
Declaration
[Tooltip("Maximum bump stop force in Newtons. Typically 2-5x spring maxForce.")]
public float compressionMaxForce
Field Value
| Type | Description |
|---|---|
| float |
compressionProgressiveness
Compression force curve exponent. 1 = linear, 2 = quadratic (rubber), 3+ = hydraulic.
Declaration
[Range(1, 4)]
[Tooltip("Force curve shape. 2.0 = quadratic (rubber), 3.0+ = aggressive (hydraulic).")]
public float compressionProgressiveness
Field Value
| Type | Description |
|---|---|
| float |
extensionActivation
Extension value (0-1) at which droop stop begins to engage. Extension = 1 - Compression, so 0.95 means nearly fully extended. Typical values: 0.90-0.98 (engages in last 2-10% of extension travel).
Declaration
[Range(0.5, 0.98)]
[Tooltip("Extension threshold (0-1) where droop stop activates. 0.95 = last 5% of travel.")]
public float extensionActivation
Field Value
| Type | Description |
|---|---|
| float |
extensionDamping
Damping rate applied when extension bump stop is active [Ns/m].
Declaration
[Tooltip("Damping rate when droop stop active [Ns/m].")]
public float extensionDamping
Field Value
| Type | Description |
|---|---|
| float |
extensionEnabled
Enable extension bump stop (droop stop). Force applied when suspension extension exceeds the activation threshold.
Declaration
[Tooltip("Enable droop stop force when suspension approaches full extension.")]
public bool extensionEnabled
Field Value
| Type | Description |
|---|---|
| bool |
extensionMaxForce
Maximum force the extension bump stop can apply in Newtons [N]. Typically lower than compression bump stop as droop stops experience less load.
Declaration
[Tooltip("Maximum droop stop force in Newtons.")]
public float extensionMaxForce
Field Value
| Type | Description |
|---|---|
| float |
extensionProgressiveness
Progressiveness of the extension bump stop force curve.
Declaration
[Range(1, 4)]
[Tooltip("Force curve shape for droop stop.")]
public float extensionProgressiveness
Field Value
| Type | Description |
|---|---|
| float |
forceMagnitude
Current bump stop force being applied [N]. Positive for compression, negative for extension.
Declaration
[NonSerialized]
[ShowInTelemetry(0, 50000, "0", "N", 1)]
public float forceMagnitude
Field Value
| Type | Description |
|---|---|
| float |
isCompressionActive
True when compression bump stop is currently engaged.
Declaration
[NonSerialized]
[ShowInTelemetry(NaN, NaN, null, null, 1)]
public bool isCompressionActive
Field Value
| Type | Description |
|---|---|
| bool |
isExtensionActive
True when extension bump stop is currently engaged.
Declaration
[NonSerialized]
[ShowInTelemetry(NaN, NaN, null, null, 1)]
public bool isExtensionActive
Field Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceCalculate(float, float, float, float, bool)
Calculates the total bump stop force based on current suspension state.
Declaration
public float Calculate(float compression, float compressionVelocity, float effectiveMass = 0, float deltaTime = 0, bool implicitDamping = false)
Parameters
| Type | Name | Description |
|---|---|---|
| float | compression | Current spring compression (0-1) |
| float | compressionVelocity | Compression velocity in m/s (positive = compressing) |
| float | effectiveMass | Sprung mass per wheel, for the implicit damping correction. 0 skips it. |
| float | deltaTime | Substep delta time, for the implicit damping correction. |
| bool | implicitDamping | When true, the damping terms get the same overshoot correction as the main damper. |
Returns
| Type | Description |
|---|---|
| float | Total bump stop force in Newtons (positive = push wheel down) |