Struct WeldJointDefinition
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
Holds two bodies rigidly together, with optional softness in either translation or rotation.
public readonly record struct WeldJointDefinition : IEquatable<WeldJointDefinition>Implements
Inherited Members
Examples
// A destructible strut: welded rigidly, but reports when it is overloaded.
var strut = WeldJointDefinition.Weld(wall, beam, jointPoint) with
{
Base = WeldJointDefinition.Weld(wall, beam, jointPoint).Base with
{
ForceThreshold = 5000.0f,
},
};
Remarks
A stiffness of zero means fully rigid. Long chains of weld joints flex regardless, because the solver is approximate; for a rigid assembly, prefer putting several shapes on one body.
Properties
- AngularDampingRatio
-
Gets the rotational damping ratio, where one is critical damping.
- AngularHertz
-
Gets the rotational stiffness in cycles per second. Zero is rigid.
- Base
-
Gets the settings shared by every joint.
- Default
-
Gets the engine defaults, with no bodies attached.
- LinearDampingRatio
-
Gets the translational damping ratio, where one is critical damping.
- LinearHertz
-
Gets the translational stiffness in cycles per second. Zero is rigid.
Methods
- Weld(Body, Body, Vector3)
-
Welds two bodies together at a shared world-space point.