Issue with characterbody2d found, is this an engine bug?

Godot Version

Godot Engine v4.4.1.stable.steam.49a5bc7b6

Question

I found an issue in my game where if a characterbody2d is standing on a platform while moving into a wall and then the platform is deleted, the character isn’t detected as falling for some reason. I checked this in an empty project and found that this issue is reproduceable. I was wondering if there was a setting in the characterbody2d that caused this issue or do I just need to find a workaround.

UPDATE: i think I found a workaround, basically you just need a shapecaster at the bottom of the characterbody that only stretches out one pixel and then add this code to the character’s script:

if is_on_floor() && is_on_wall() && !shape_cast_2d.is_colliding():
	velocity.x = 0

also you have to place this code before the move_and_slide()

Check if add platform velocity on your CharacterBody is causing it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.