Table of Contents

Class CenterDistanceLimitConstraintComponent

Namespace
Stride.BepuPhysics.Constraints
Assembly
Stride.BepuPhysics.dll

Constrains the center of two bodies to be separated by a distance within a range. This constraint ensures that the distance between the center points of two bodies remains within a minimum and maximum range. Unlike DistanceLimitConstraintComponent, this constraint operates directly on the body centers rather than on specific points on the bodies.

[DataContract]
[DefaultEntityComponentProcessor(typeof(ConstraintProcessor), ExecutionMode = ExecutionMode.Runtime)]
[ComponentCategory("Physics - Bepu Constraint")]
public sealed class CenterDistanceLimitConstraintComponent : TwoBodyConstraintComponent<CenterDistanceLimit>, IIdentifiable, ITwoBody, ISpring
Inheritance
object
ConstraintComponent<CenterDistanceLimit>
TwoBodyConstraintComponent<CenterDistanceLimit>
CenterDistanceLimitConstraintComponent
Implements
Inherited Members

Remarks

This is a specialized variant of DistanceLimitConstraintComponent that works with body centers. Use this when you need to constrain the overall distance between bodies without specifying exact attachment points.

Constructors

CenterDistanceLimitConstraintComponent()

public CenterDistanceLimitConstraintComponent()

Properties

MaximumDistance

Maximum distance between the body centers.

public float MaximumDistance { get; set; }

Property Value

float

MinimumDistance

Minimum distance between the body centers.

public float MinimumDistance { get; set; }

Property Value

float

SpringDampingRatio

The ratio of the spring's actual damping to its critical damping. 0 is undamped, 1 is critically damped, and higher values are overdamped. Higher damping ratios reduce oscillations and make the connection less elastic.

public float SpringDampingRatio { get; set; }

Property Value

float

SpringFrequency

The target number of undamped oscillations per unit of time. Higher frequency values create stiffer connections, while lower values allow more elasticity in the joint.

public float SpringFrequency { get; set; }

Property Value

float