Interface CollisionConfig

interface CollisionConfig {
    collidesWithTiles?: boolean;
    collisionGroups?: string[];
    ignoreCollisionGroups?: string[];
    ignoreMissingTiles?: boolean;
}

Properties

collidesWithTiles?: boolean

Determines whether the character should collide with the tilemap.

Default Value

true

collisionGroups?: string[]

Array with collision groups. Only characters with at least one matching collision group collide. If omitted it will be initialized with a default collision group called 'geDefault'. If you want to keep a character from colliding with any other character, you can simply provide an empty array here.

Default Value

['geDefault']

ignoreCollisionGroups?: string[]

Array with collision groups to ignore. Only characters with none of these collision groups collide. If a group is both in CollisionConfig.collisionGroups and CollisionConfig.ignoreCollisionGroups, the entry in CollisionConfig.collisionGroups will be ignored/overridden.

Default Value

[]

ignoreMissingTiles?: boolean

If set to true, the character will not collide with a position that has no tile on any layer. This is especially useful if you want the character to be able to move outside of the map boundaries.

Default Value

false