Table of Contents

Class ConstraintComponent<T>

Namespace
Stride.BepuPhysics.Constraints
Assembly
Stride.BepuPhysics.dll
public abstract class ConstraintComponent<T> : ConstraintComponentBase, IIdentifiable where T : unmanaged, IConstraintDescription<T>

Type Parameters

T
Inheritance
object
ConstraintComponent<T>
Implements
Derived
Inherited Members

Constructors

ConstraintComponent(int)

protected ConstraintComponent(int bodies)

Parameters

bodies int

Properties

Attached

Whether this constraint is in a valid state and actively constraining its targets.

public override bool Attached { get; }

Property Value

bool

Remarks

May not be attached if it is not in a scene, when not Enabled, when any of its target is null, not in a scene or in a different simulation

Methods

BodiesChanged()

protected override void BodiesChanged()

GetAccumulatedForceMagnitude()

Returns the sum of all forces this constraint applied on the last tick

public override float GetAccumulatedForceMagnitude()

Returns

float

Remarks

This can be used to compare with a given motor constraints' MaximumForce property for example.

GetAccumulatedImpulseMagnitude()

Returns the sum of all impulses this constraint applied on the last tick

public override float GetAccumulatedImpulseMagnitude()

Returns

float

Remarks

Impulses increase depending on FixedTimeStep, as well as the amount of SolverSubStep. You may want to use GetAccumulatedForceMagnitude() instead.