Applying gravity to CharacterBody3D causes sliding against walls to become sticky/gritty

Godot Version

4.2

Question

I found undesirable behavior with move_and_slide() that seems like a bug to me, but I’d like to verify before I try reporting it.

When accelerating a grounded CharacterBody3D against an angled wall without gravity, the sliding is smooth and consistent. However, when applying gravity, move_and_slide()'s interactions with walls become inconsistent, with its velocity fluctuating wildly and stopping at seemingly random points. This is a bug, yes? Should I report it?

Some tutorials I’ve seen seem to try to avoid this by applying gravity only while airborne, but that would keep the body from naturally sliding down slopes. breaking CharacterBody3D’s “Stop on Slope” setting.

I have a zip archive of the demo project ready, but I don’t know if I can attach it here.

Check your max floor angle

Have done—no improvement.

I remember reading that this may be caused by the CollisionShape3D being a box instead of a cylinder, but I have not yet tested it.

Update: This bug occurs with at least BoxShape3D, CapsuleShape3D, and less so with CylinderShape3D.