Class SliderConstraintDesc
- Namespace
- Stride.Physics.Constraints
- Assembly
- Stride.Physics.dll
Description of a SliderConstraint.
[Display("Slider", null)]
[DataContract("SliderConstraintDesc")]
public class SliderConstraintDesc : IConstraintDesc
- Inheritance
-
SliderConstraintDesc
- Implements
Properties
AxisInA
Axis on which the gear will rotate relative to body A.
[Display(2, null, null)]
public Quaternion AxisInA { get; set; }
Property Value
AxisInB
Axis on which the gear will rotate relative to body B.
[Display(3, null, null)]
public Quaternion AxisInB { get; set; }
Property Value
Limit
[Display(5, null, null)]
public SliderConstraintDesc.LimitDesc Limit { get; set; }
Property Value
PivotInA
Position local to rigidbody A.
[Display(0, null, null)]
public Vector3 PivotInA { get; set; }
Property Value
Remarks
Not used for the gear constraint.
PivotInB
Position local to rigidbody B.
[Display(1, null, null)]
public Vector3 PivotInB { get; set; }
Property Value
Remarks
Ignored when creating a body-world constraint.
Type
Type of the constraint description.
public ConstraintTypes Type { get; }
Property Value
UseLinearReferenceFrameA
If true
, UseLinearReferenceFrameA sets the reference sign to -1, which is used in some correction computations regarding limits and transforms.
[Display(4, null, null)]
public bool UseLinearReferenceFrameA { get; set; }
Property Value
Remarks
In body-world constraint the bodyA is actually passed as bodyB.
Methods
Build(RigidbodyComponent, RigidbodyComponent)
Create a new constraint according to the description properties between bodies A and B, or between A and World.
public Constraint Build(RigidbodyComponent bodyA, RigidbodyComponent bodyB)
Parameters
bodyA
RigidbodyComponentbodyB
RigidbodyComponent
Returns
- Constraint
A new constraint constructed in the Simulation. Needs to be added with AddConstraint(Constraint) to take effect.