Pulse Works Studio

Parse Error: Function "move_and_slide_with_snap()" not found in base CharacterBody2D.

move_and_slide_with_snap() was removed. Snapping is a property on CharacterBody2D.

Cause

Godot 3 took the snap vector as an argument. Godot 4 stores floor snap on the body (floor_snap_length) and uses move_and_slide() with no arguments. The method is missing even after the class rename.

Fix

extends CharacterBody2D

func _ready() -> void:
	floor_snap_length = 8.0

func _physics_process(delta: float) -> void:
	velocity.y += 980.0 * delta
	move_and_slide()

Related

Godot Dev Tools is a Pulse Works Studio project. All error explainers.