Skip to content

Support larger-than-tile-size object collisions #743

@cxong

Description

@cxong

The collision system currently checks for collisions within the same tile plus all neighbouring tiles. For objects larger than tile size, it needs to check a larger area.

For now we can go with a simple fix - extend the search area based on the object size. For example if the object is 64x64 (i.e. covers 4x6 tiles), extend the search around the current tile by 2 tiles to the left / right, and 3 tiles above / below.

This doesn't work for large object vs large object collisions, but a proper fix would be preferred, e.g. #472 , or using a space-partitioning collision system, rather than a tile based one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions