Fast collision issue?

so I’m trying to stop my player from flying through collision wall tiles from the tile layer in tiled. Here is what I have on my map in Tiled. These red transparent squares are collision walls. They are tile layers. They are 66x66. This is due to the map & all other tiles being extruded to prevent tile bleeding. I have 2 rows of them because you said to thicken the walls. I tried that, it did not work. It has collision when slowly walking into it, but when running fast then jumping it lets my character pass right through the collision wall as well as the whole level.

Here is a screenshot of the wall I made in Tiled :

Here is a screenshot of what I’m trying to accomplish moving the character at high speeds :

Finally, here is a short, 2-second clip of the issue I’m having :

Any help as always is MUCH appreciated! :slight_smile:

Thank You!

Why is it allowing my character to slide through the invisible wall? It is called tunneling. But how to stop it?

First use renderDebug, something like

collidingLayer.renderDebug(this.add.graphics());

in create().

@samme : here is a screenshot of what is happening :

And there’s tunneling only when jumping? There may be something weird in your jump code.

Are you moving the player or body manually at all, instead of by velocity?

@samme : No. I do not believe so.

Does the player ever tunnel without jumping?

@samme : no. and it must be the player running instead of walking, and they must jump at the same time in order to tunnel.

Is it really running at 1 FPS?

You can try adding { tileBias: 32 } in physics config. But if he’s really passing through 2 solid tiles it seems like something else must be wrong.

1 Like

@samme : it only runs @ 1 fps when using that debug function in the create ( ) function. :slight_smile:

@samme : '{ tileBias : 66 }' seems to work PERFECTLY! My tiles are all 66x66 to prevent tile bleeding by extrusion! Thank you! :slight_smile: