i have a problem with the detection of collisions in a 2D top down project.
The player is a KinematicBody2d with the movement via moveandcollide. In the map the player is on his own PB2D layer and mask. The tiles in the tilemap have all some CP2D and the tilemap is on its own layer and mask.
The collision detection works if both player and tilemap are on the same layer but then the player cant "go through / go over" the tile.
I want is to detect if the player is moving over the tile with the name or number x and then cut his move speed in half.
Is there away to make this possible or do i have to rethink anything?
The code can be found https://github.com/Fedena22/NGP
Thanks for your help.