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

Constructor

new()

Default constructor.

Variables

localSwingAxis1:Vec3

The first body's local swing axis.

The second swing axis is also attached to the first body. It is perpendicular to the first swing axis, and is automatically computed when the joint is created.

localTwistAxis1:Vec3

The first body's local twist axis.

localTwistAxis2:Vec3

The second body's local twist axis.

maxSwingAngle1:Float

The max angle of rotation along the first swing axis. This value must be positive.

maxSwingAngle2:Float

The max angle of rotation along the second swing axis. This value must be positive.

swingSpringDamper:SpringDamper

The rotational spring and damper along the swing axis of the joint.

twistLimitMotor:RotationalLimitMotor

The rotational limit and motor along the twist axis of the joint.

twistSpringDamper:SpringDamper

The rotational spring and damper along the twist axis of the joint.

Methods

init(rigidBody1:RigidBody, rigidBody2:RigidBody, worldAnchor:Vec3, worldTwistAxis:Vec3, worldSwingAxis:Vec3):RagdollJointConfig

Sets rigid bodies, local anchors from the world anchor worldAnchor, local twist axes from the world twist axis worldTwistAxis, local swing axis from the world swing axis worldSwingAxis, 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