Editor API Reference - v1.1.16
    Preparing search index...

    Type Alias CollisionComponent

    Collision Component Properties.

    type CollisionComponent = {
        asset: number;
        axis: number;
        enabled: boolean;
        halfExtents: number[];
        height: number;
        radius: number;
        renderAsset: number;
        type: string;
    }
    Index

    Properties

    asset: number

    The id of the model asset that will be used as a source for the triangle-based collision mesh.

    null
    
    axis: number

    Aligns the capsule/cylinder with the local-space X, Y or Z axis of the entity.

    1
    
    enabled: boolean

    Whether the component is enabled.

    true
    
    halfExtents: number[]

    The half-extents of the collision box: local space half-width, half-height, and half-depth.

    [0.5,0.5,0.5]
    
    height: number

    The tip-to-tip height of the capsule/cylinder.

    2
    
    radius: number

    The radius of the capsule/cylinder body.

    0.5
    
    renderAsset: number

    The id of the render asset that will be used as a source for the triangle-based collision mesh.

    null
    
    type: string

    The type of collision primitive. Can be: box, sphere, capsule, cylinder, mesh.

    "box"