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
-
objectConstraintComponent<T>
- Implements
- Derived
- Inherited Members
Constructors
ConstraintComponent(int)
protected ConstraintComponent(int bodies)
Parameters
bodiesint
Properties
Attached
Whether this constraint is in a valid state and actively constraining its targets.
public override bool Attached { get; }
Property Value
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
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
Remarks
Impulses increase depending on FixedTimeStep, as well as the amount of SolverSubStep. You may want to use GetAccumulatedForceMagnitude() instead.