SerenityJS
    Preparing search index...

    Class EntityCollisionTrait

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    entity: Entity

    The entity that this trait is attached to.

    frictionForce: number = 1

    The friction force being applied to the entity.

    frictionScaler: number = 0.97

    The friction scaler value of the entity.

    height: number = EntityCollisionTrait.defaultHeight

    The height of the entity collision box.

    identifier: string = ...

    The identifier of the trait.

    width: number = EntityCollisionTrait.defaultWidth

    The width of the entity collision box.

    xAxisCollision: number = 0

    The x-axis collision value of the entity. -1 = colliding with a wall -x 0 = not colliding with a wall 1 = colliding with a wall +x

    yAxisCollision: number = 0

    The y-axis collision value of the entity. -1 = colliding with the -y 0 = not colliding with the ground or ceiling 1 = colliding with the +y

    zAxisCollision: number = 0

    The z-axis collision value of the entity. -1 = colliding with a wall -z 0 = not colliding with a wall 1 = colliding with a wall +z

    components: string[] = []

    The entity component identifiers that this trait is compatible with by default. If empty, the trait will not be initialized by any component.

    defaultHeight: number = 1.62

    The default height of the entity collision box.

    defaultWidth: number = 0.6

    The default width of the entity collision box.

    identifier: "collision"

    The identifier of the trait.

    types: EntityIdentifier[] = ...

    The entity type identifiers that this trait is compatible with by default.

    Accessors

    Methods