HaxeFlixel / HaxeFlixel/flixel
Altered FlxSprite width seemingly not recognized in collision with a FlxTileMap via overlapsWithCallback
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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