nape-js API
    Preparing search index...

    Interface CharacterControllerOptions

    Configuration options for CharacterController.

    interface CharacterControllerOptions {
        characterTag?: CbType;
        down?: Vec2;
        filter?: InteractionFilter | null;
        maxSlopeAngle?: number;
        oneWayPlatformTag?: CbType;
    }
    Index

    Properties

    characterTag?: CbType

    CbType assigned to the character body (required if oneWayPlatformTag is set).

    down?: Vec2

    World-space "down" direction used for ground / wall raycasts.

    Default Vec2(0, 1) matches a standard top-down-Y platformer (gravity points along +Y). Override for radial-gravity / planet-platformer scenarios — set cc.down each frame to the unit vector pointing from the character toward whatever you treat as "down" (e.g. the nearest planet's centre). Walls are detected perpendicular to this direction.

    The vector is normalized internally; magnitude is ignored.

    Vec2(0, 1)
    
    filter?: InteractionFilter | null

    InteractionFilter used for ground/wall detection raycasts. When null, an auto-generated filter excluding the character's own shapes is used.

    null
    
    maxSlopeAngle?: number

    Maximum climbable slope angle in radians.

    Math.PI / 4 (45 degrees)
    
    oneWayPlatformTag?: CbType

    CbType for one-way platforms. When set, the controller automatically creates a PreListener that ignores collisions when the character approaches from below — matching the original nape Haxe engine pattern.