CharacterBody2D Player not detecting spike TileMapLayer properly when colliding

Godot Version

4.3

Question

Heya.

So I’m working on a platformer game called SGALE, where the player at one point will start to grow and stuff, and if he’s too big to fit in level, he’ll die. A fun li’l platformer for my school project and my homies.

Here’s a small gameplay footage of the game: https://youtu.be/f_2dja4S8ac

This is the player scene’s hierarchy order:

The player is growing by simply increasing its size by code, so that the CollisionShape along with the area2d (and ITS OWN collisions) will scale along with it. The expandable area is an area node with the actual square sprite of the player, with some points (for some other useful stuff) Some extra stuffs like the expressions, coyote timer node, animation players and stuff (AnimationPlayer does not do anything that affects with collisions, it only at one point changes the size of the player, but that DEFENITELY wont be related with this bug). Raycasts for checking if the player is bit too big for the level, and then will kill the player.

And here’s the spike hitbox area node.

Here’s a screenshot of what i am about to explain:

So, all the main collisions would be managed in collision layer 1, and the spikes’ hurting stuff would be done in collision layer 2.

Speaking of which, ALL THE TILES and THE SPIKES are all TileMapLayer. The normal tiles in layer 1, and the spike in layer 2 (shown here).

And right below, in the tileset tab, I’ve also provided the collision of the spike that I’ve given to it.
Now the issue is this; the spikes are not working properly.

The bug is seen whenever I’m like, INBETWEEN 2 spikes and also when I first jump and touch the spike above me, but I just simply slide away. I can’t really explain it well. But my assumption is that it could also be because of the other collision shape node in my player scene tree…? But the chance for THAT is pretty low tbh.

BUG GAMEPLAY PREVIEW

Here’s the project file

Thx in advance!

The same post is in Godot Engine Discord Server too: Discord