How to make the player NOT attached to a platform

Hello
I want the player on my 2d runner to be able to have movement, but also to not get dragged by moving platforms

the only thing that seemed to be working was to set the plane constraint to x

Capture d'écran 2024-02-29 104402

which gave this result :

that’s exactly the feeling i want, but i cant get the player to move with the plane constraint, i have to disable it, which gives this :

in this case the player can move, but gets “attached” to the moving surface

is it possible to have the player be able to move while not getting dragged by the platform ?

you can add a collider on the feet to detect the moving platforms an put some actor tag on the moving platforms like “movingPlatform” and enable overlap events on both. when the collider starts overlapping you can turn some boolean like ‘isInPlatform = true’ and a float platformSpeed = the X speed of the platform, and when the collider ends overlap just set isInPlatform = false. then just do an if (a branch) is in platform, add the movement to the char.

You can do the same with ‘trace line’ by tracing a line from the char to the floor. if the trace line has a hit, check if it is a platform. if it is then add the movement. in this case be sure the traceline is not far below the char…must trace from center of the char (or so) up to its feet (or just a bit more)

In short you just determine if you are standing on a moving platform and add the opposite movement to the char.

I tried doing that but it messes with the movability of the character ; the “player movement” and the “platform movement” don’t work really well together when both applied

is there another way than adding direct movement to the player ? like something that makes it so that the player “floor reference” (if that makes sense) is always the floor and never the obstacles ?