Class ConeTwistConstraint

A Cone Twist constraint, useful for ragdolls.

Hierarchy (view full)

Constructors

  • Parameters

    • bodyA: Body
    • bodyB: Body
    • Optional options: {
          angle?: number;
          axisA?: Vec3;
          axisB?: Vec3;
          collideConnected?: boolean;
          maxForce?: number;
          pivotA?: Vec3;
          pivotB?: Vec3;
          twistAngle?: number;
      }
      • Optional angle?: number

        The aperture angle of the cone.

        Default

        0
        
      • Optional axisA?: Vec3

        The axis direction for the constraint of the body A.

      • Optional axisB?: Vec3

        The axis direction for the constraint of the body B.

      • Optional collideConnected?: boolean

        Wether to collide the connected bodies or not.

        Default

        false
        
      • Optional maxForce?: number

        The maximum force that should be applied to constrain the bodies.

        Default

        1e6
        
      • Optional pivotA?: Vec3

        The pivot point for bodyA.

      • Optional pivotB?: Vec3

        The pivot point for bodyB.

      • Optional twistAngle?: number

        The twist angle of the joint.

        Default

        0
        

    Returns ConeTwistConstraint

Properties

angle: number

The aperture angle of the cone.

axisA: Vec3

The axis direction for the constraint of the body A.

axisB: Vec3

The axis direction for the constraint of the body B.

bodyA: Body

Body A.

bodyB: Body

Body B.

collideConnected: boolean

Set to false if you don't want the bodies to collide when they are connected.

coneEquation: ConeEquation
equationX: ContactEquation
equationY: ContactEquation
equationZ: ContactEquation
equations: Equation[]

Equations to be solved in this constraint.

id: number
pivotA: Vec3

Pivot, defined locally in bodyA.

pivotB: Vec3

Pivot, defined locally in bodyB.

twistAngle: number

The twist angle of the joint.

twistEquation: RotationalEquation
idCounter: number

Methods