Skip to content

Support multiple hit boxes per Sprite #1057

Description

@bunny-therapist

Enhancement request:

What should be added/changed?

A sprite should be able to have any number of hit boxes, with one being the default (preserves backwards compatibility). Then when you check for collisions you can input the hit box name as an argument if a non-default hit-box should be used. For example, set_hit_box and check_for_collisions could take a str argument for hitbox name (check for collisions could default to default hitbox if a sprite does not have a hitbox with that name).

Tiled supports multiple hit boxes per object, but when reading Tiled files, arcade currently just discard any additional hit boxes with a warning. If this feature is implemented, support for this Tiled feature could also be added later.

What would it help with?

In games you typically want different hit boxes for e.g. player touching ground/walls and player hitting enemies. (Big hit box for touching solids, small for hitting enemies.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions