Player gets stuck between walls

I am using “separate objects” action.

Problem

Player gets stuck between two walls when I press w and d or a

What is the expected result

It should just pass through

What is the actual result

It gets stuck until I let go of d or a

Related screenshots

pixil-frame-0 (2)
this is basically what it looks like, depending on the angle, if I press w and d (or “a” at certain times) it will get stuck until I let go of d or a, (in the picture the purple cubes are meant to be two walls, player is green cube)

This is hard to explain properly sorry

For some context, I am making 3d collision, this is the only thing left (that I know of) that’s giving me problems (it happens on 2d as well)

Are the 2 wall sections perfectly aligned? As in they both have identical x origin values (assuming the origin is in the top left)? Not that one is a decimal point different, but they’re both 100% the same.

If they are the same, can you share the events that move the player and separate the player from the wall objects?

Yes, theyre aligned perfectly.

These are the events

Those are events to move the camera. Why are you testing for collision with WallsAndFloors, but moving it away from Cube?

What about the player movement events? And what movement behaviour are you using?

testing for collision actually wasnt originally there, it does no difference.
Behaviors

  • Fire bullet
  • Health
  • Tween.

This picture mostly has events that changes the speed

these are mostly the events for moving


What is this detect keybind condition? Is that from an extension?

I made that for if the keybind is a mouse button

So it’s an extension you wrote? What does it do? Can you share the events in it?

It doesn’t really matter probably, I tried it on a test project that just had regular controls (with separate objects) and the same thing happens.

This extension solves these kind of issues:
https://wiki.gdevelop.io/gdevelop5/extensions/top-down-corner-sliding/

Does it only works with topdown behavior? Idk how to make an FPS with topdown behavior. (Edit): okay that’s not the problem, I can fix that. BUT the problem now is. If an object is rotated (2d rotation) it will not collide as if it were rotated, this only happens with the behaviors. Know any fixes?

(another reply since idk if you got the message)
Can you allow the behavior to collide with rotated objects normally?

Sorry, I forgot the notification, indeed it only works with top-down movement and rectangles without rotation.

For a FPS, maybe a rounded collision mask would work better. You can “stick” 3D models on hidden sprites with this extension:
https://wiki.gdevelop.io/gdevelop5/extensions/sticker/