Class DistanceLimitConstraintComponent
- Namespace
- Stride.BepuPhysics.Constraints
- Assembly
- Stride.BepuPhysics.dll
Constrains points on two bodies to be separated by a distance within a specified range. This constraint ensures that the distance between two points on two bodies remains within a minimum and maximum range. It is useful for creating elastic or flexible connections between bodies, where the distance can vary within the specified limits.
[DataContract]
[DefaultEntityComponentProcessor(typeof(ConstraintProcessor), ExecutionMode = ExecutionMode.Runtime)]
[ComponentCategory("Physics - Bepu Constraint")]
public sealed class DistanceLimitConstraintComponent : TwoBodyConstraintComponent<DistanceLimit>, IIdentifiable
- Inheritance
-
ConstraintComponent<DistanceLimit>TwoBodyConstraintComponent<DistanceLimit>DistanceLimitConstraintComponent
- Implements
- Inherited Members
Remarks
Unlike CenterDistanceLimitConstraintComponent, this constraint allows you to specify exact attachment points on each body using LocalOffsetA and LocalOffsetB properties. If you need to constrain only the centers of bodies, use CenterDistanceLimitConstraintComponent instead.
Constructors
DistanceLimitConstraintComponent()
public DistanceLimitConstraintComponent()
Properties
LocalOffsetA
Local offset from the center of body A to its attachment point.
public Vector3 LocalOffsetA { get; set; }
Property Value
LocalOffsetB
Local offset from the center of body B to its attachment point.
public Vector3 LocalOffsetB { get; set; }
Property Value
MaximumDistance
Maximum distance permitted between the point on A and the point on B.
public float MaximumDistance { get; set; }
Property Value
MinimumDistance
Minimum distance permitted between the point on A and the point on B.
public float MinimumDistance { get; set; }
Property Value
SpringDampingRatio
public float SpringDampingRatio { get; set; }
Property Value
SpringFrequency
public float SpringFrequency { get; set; }