crashcat docs
    Preparing search index...

    Type Alias KCCSettings

    settings for creating a kinematic character

    type KCCSettings = {
        backFaceMode?: BackFaceMode;
        characterPadding?: number;
        collisionTolerance?: number;
        enhancedInternalEdgeRemoval?: boolean;
        hitReductionCosMaxAngle?: number;
        innerRigidBody?: { objectLayer: number; shape: Shape };
        mass?: number;
        maxCollisionIterations?: number;
        maxConstraintIterations?: number;
        maxNumHits?: number;
        maxSlopeAngle?: number;
        maxStrength?: number;
        minTimeRemaining?: number;
        penetrationRecoverySpeed?: number;
        predictiveContactDistance?: number;
        shape: Shape;
        shapeOffset?: Vec3;
        supportingVolumePlane?: Vec4;
        up?: Vec3;
    }
    Index

    Properties

    backFaceMode?: BackFaceMode

    how to handle triangle mesh back faces

    BackFaceMode.COLLIDE
    
    characterPadding?: number

    spacing from surfaces

    0.02
    
    collisionTolerance?: number

    penetration tolerance

    1e-3
    
    enhancedInternalEdgeRemoval?: boolean

    enable enhanced internal edge removal

    false
    
    hitReductionCosMaxAngle?: number

    hit merging angle as cosine

    cos(2.5°)≈0.999
    
    innerRigidBody?: { objectLayer: number; shape: Shape }

    configuration for the optional inner rigid body (for character presence in the physics world)

    mass?: number

    character mass in kg

    70
    
    maxCollisionIterations?: number

    max collision detection iterations per update

    5
    
    maxConstraintIterations?: number

    max constraint solving iterations

    15
    
    maxNumHits?: number

    max contacts per query

    256
    
    maxSlopeAngle?: number

    max slope angle in radians

    ~0.873 = 50°
    
    maxStrength?: number

    maximum push force in N

    100
    
    minTimeRemaining?: number

    early-out threshold for time remaining

    1e-4
    
    penetrationRecoverySpeed?: number

    penetration recovery speed 0-1

    1.0
    
    predictiveContactDistance?: number

    look-ahead distance for predictive contacts

    0.1
    
    shape: Shape

    collision shape for the character

    shapeOffset?: Vec3

    local space offset of shape relative to character position

    [0,0,0]
    
    supportingVolumePlane?: Vec4

    Plane defining what can support the character (normal.xyz, constant.w). For a capsule shape you might use [0, 1, 0, -characterRadius] for stricter filtering.

    [up.x,up.y,up.z,-1e10] - accepts any contact.
    
    up?: Vec3

    up direction

    [0,1,0]