phaser
phaser copied to clipboard
Broken Example (player doesnt get physics collider)
Version
-
Phaser Version: 3.16.2
-
Operating system: Windows
-
Browser: Chrome, but happens on other as well
Description
The player in this example seems to not be getting it's collider (pressing C to show debug before it falls off screen) Broken Example
Additional Information
Found via yassin#3588 who asked about it in the discord, I was unable to find a reason it was happening through a quick glance and so made this issue.
There seems to be an over-correction (at least for this example) in
https://github.com/photonstorm/phaser/blob/70b500cd2881dddd3a816a504c28ad1c692df96f/src/physics/arcade/World.js#L2168-L2173
It becomes visible when the TILE_BIAS is increased and the player is moved way over the tile during the collision (instead of passing though). Removing the if stabilizes it (although the real solution probably needs to refine it to apply it only to certain cases).
Had a quick look and the player collides happily with the 'ground' layer in the middle, just not the 'kenny' later on the left. Needs further investigation, but to do with varying tile sizes rather than anything else.