A generic joint config is used for constructions of generic joints.

Constructor

new()

Default constructor.

Variables

localBasis1:Mat3

The first body's local constraint basis.

localBasis2:Mat3

The second body's local constraint basis.

rotationalLimitMotors:Array<RotationalLimitMotor>

The rotational limits and motors along the rotation axes of the relative x-y-z Euler angles.

rotationalSpringDampers:Array<SpringDamper>

The rotational springs and dampers along the rotation axes of the relative x-y-z Euler angles.

translationalLimitMotors:Array<TranslationalLimitMotor>

The translational limits and motors along the first body's the constraint basis.

translationalSpringDampers:Array<SpringDamper>

The translational springs and dampers along the first body's constraint basis.

Methods

init(rigidBody1:RigidBody, rigidBody2:RigidBody, worldAnchor:Vec3, worldBasis1:Mat3, worldBasis2:Mat3):GenericJointConfig

Sets rigid bodies, local anchors from the world anchor worldAnchor, local bases from the world bases worldBasis1 and worldBasis2, and returns this.

Inherited Variables

Defined by JointConfig

allowCollision:Bool

Whether to allow the connected rigid bodies to collide each other.

breakForce:Float

The joint will be destroyed when magnitude of the constraint force exceeds the value.

Set 0 for unbreakable joints.

breakTorque:Float

The joint will be destroyed when magnitude of the constraint torque exceeds the value.

Set 0 for unbreakable joints.

localAnchor1:Vec3

The local position of the first rigid body's anchor point.

localAnchor2:Vec3

The local position of the second rigid body's anchor point.

positionCorrectionAlgorithm:Int

The type of the position correction algorithm for the joint.

See PositionCorrectionAlgorithm for details.

rigidBody1:RigidBody

The first rigid body attached to the joint.

rigidBody2:RigidBody

The second rigid body attached to the joint.

solverType:Int

The type of the constraint solver for the joint.

See ConstraintSolverType for details.

Inherited Methods