crashcat docs
    Preparing search index...

    Type Alias SwingTwistConstraintSettings

    Settings for creating a swing-twist constraint

    type SwingTwistConstraintSettings = {
        bodyIdA: BodyId;
        bodyIdB: BodyId;
        constraintPriority?: number;
        maxFrictionTorque?: number;
        normalHalfConeAngle?: number;
        numPositionStepsOverride?: number;
        numVelocityStepsOverride?: number;
        planeAxis1: Vec3;
        planeAxis2: Vec3;
        planeHalfConeAngle?: number;
        position1: Vec3;
        position2: Vec3;
        space?: constraints.ConstraintSpace;
        swingMotorSettings?: motorSettings.MotorSettings;
        swingType?: SwingType;
        twistAxis1: Vec3;
        twistAxis2: Vec3;
        twistMaxAngle?: number;
        twistMinAngle?: number;
        twistMotorSettings?: motorSettings.MotorSettings;
    }
    Index

    Properties

    bodyIdA: BodyId
    bodyIdB: BodyId
    constraintPriority?: number

    constraint priority (higher = solved first)

    0
    
    maxFrictionTorque?: number

    maximum friction torque

    0
    
    normalHalfConeAngle?: number

    normal half cone angle (radians) - swing limit around Z axis

    numPositionStepsOverride?: number

    override number of position solver iterations (0 = use default)

    0
    
    numVelocityStepsOverride?: number

    override number of velocity solver iterations (0 = use default)

    0
    
    planeAxis1: Vec3

    plane axis on body 1 (Z axis of constraint space, perpendicular to twist)

    planeAxis2: Vec3

    plane axis on body 2

    planeHalfConeAngle?: number

    plane half cone angle (radians) - swing limit around Y axis

    position1: Vec3

    pivot point on body 1

    position2: Vec3

    pivot point on body 2

    ConstraintSpace.WORLD
    
    swingMotorSettings?: motorSettings.MotorSettings

    swing motor settings (spring + torque limits)

    swingType?: SwingType

    swing limit type

    SwingType.Cone
    
    twistAxis1: Vec3

    twist axis on body 1 (X axis of constraint space)

    twistAxis2: Vec3

    twist axis on body 2

    twistMaxAngle?: number

    maximum twist angle (radians)

    0
    
    twistMinAngle?: number

    minimum twist angle (radians)

    0
    
    twistMotorSettings?: motorSettings.MotorSettings

    twist motor settings (spring + torque limits)