HaxeFlixel / HaxeFlixel/flixel

Altered FlxSprite width seemingly not recognized in collision with a FlxTileMap via overlapsWithCallback

Open
#877 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haxe
Stars
2.2k
Forks
522
Avg merge
34m
Merged PRs (30d)
1

Description

http://pastebin.com/d62j67pr

You'll need to slap in a 16x16 tilemap for this, but either way...

While trying to code up a game with some hitscan action, I noticed this. The player FlxSprite has its width reduced. That's reflected in debugger. But except for the very edges, it looks like the overlap check is going off for both tiles, even when the hitbox for the 'player' sprite is situated squarely in the middle of a tile.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Pastebin reproduction and the overlapsWithCallback path involving FlxSprite and FlxTileMap. Reproduce the issue using a 16x16 tilemap and a player sprite with a reduced width; done means overlap detection respects the altered hitbox when the sprite is centered within a tile.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.