Move and slide with snap works inconsistently.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gazer500

Title says it all. Sometimes move and slide with snap works perfectly, while other times it doesn’t work when going down slopes and I bounce down them. For context, this is my movement code:

if snap:
	total_velocity = move_and_slide_with_snap(velocity, snap_vector, Vector2.UP, true, 4, deg2rad(90.0))
else:
	total_velocity = move_and_slide(velocity, Vector2.UP, true, 4, deg2rad(90.0))

Snap is what determines whether I should snap or not, and my snap vector is (0, 32). I also tested this by setting snap to always be true, and I still have inconsistent snapping. I have no idea how I should approach this, so any help would be appreciated.