crashcat docs
    Preparing search index...

    Type Alias KCC

    KCC (kinematic character controller) state

    type KCC = {
        backFaceMode: BackFaceMode;
        characterPadding: number;
        collisionTolerance: number;
        contacts: CharacterContact[];
        cosMaxSlopeAngle: number;
        enhancedInternalEdgeRemoval: boolean;
        ground: GroundInfo;
        hitReductionCosMaxAngle: number;
        innerRigidBody: { objectLayer: number; shape: Shape } | undefined;
        innerRigidBodyId: BodyId;
        lastDeltaTime: number;
        linearVelocity: Vec3;
        listenerContacts: ListenerContactsPool;
        mass: number;
        maxCollisionIterations: number;
        maxConstraintIterations: number;
        maxNumHits: number;
        maxSlopeAngle: number;
        maxStrength: number;
        minTimeRemaining: number;
        penetrationRecoverySpeed: number;
        position: Vec3;
        predictiveContactDistance: number;
        quaternion: Quat;
        shape: Shape;
        shapeOffset: Vec3;
        supportingVolumePlane: Vec4;
        up: Vec3;
    }
    Index

    Properties

    backFaceMode: BackFaceMode

    whether to collide with triangle mesh back faces

    characterPadding: number

    spacing from surfaces

    collisionTolerance: number

    penetration tolerance

    contacts: CharacterContact[]

    active contacts for current frame

    cosMaxSlopeAngle: number

    cosine of max slope angle (precomputed)

    enhancedInternalEdgeRemoval: boolean

    enable enhanced internal edge removal (expensive, off by default)

    ground: GroundInfo

    current ground info

    hitReductionCosMaxAngle: number

    hit merging angle (cosine)

    innerRigidBody: { objectLayer: number; shape: Shape } | undefined

    configuration for the inner rigid body (for visibility to physics world)

    innerRigidBodyId: BodyId

    inner rigid body ID for physics visibility (or INVALID_BODY_ID)

    lastDeltaTime: number

    last delta time from update() - used for supporting contact velocity check

    linearVelocity: Vec3

    linear velocity

    listenerContacts: ListenerContactsPool

    pool of listener contact tracking values

    mass: number

    character mass (kg) - for pushing objects

    maxCollisionIterations: number

    max collision detection iterations per update

    maxConstraintIterations: number

    max constraint solving iterations

    maxNumHits: number

    max contacts per query

    maxSlopeAngle: number

    max slope angle (radians) - slopes steeper are not walkable

    maxStrength: number

    max push force (N)

    minTimeRemaining: number

    early-out threshold for time remaining

    penetrationRecoverySpeed: number

    penetration recovery speed (0-1)

    position: Vec3

    world-space position

    predictiveContactDistance: number

    look-ahead distance for predictive contacts

    quaternion: Quat

    orientation

    shape: Shape

    collision shape

    shapeOffset: Vec3

    local space offset of shape relative to character position

    supportingVolumePlane: Vec4

    Plane defining what can support the character (normal.xyz, constant.w). Every contact behind this plane can support the character. Every contact in front of this plane only collides without providing support. Default: [up.x, up.y, up.z, -1e10] - accepts any contact. Plane equation: dot(point, normal) + constant = 0 SignedDistance(point) = dot(point, normal) + constant

    up: Vec3

    up direction (normalized)