Why doesn’t this work? This is supposed to make the camera jump to a place every time the player gets there but instead it just permanently follows the player around? Also the print isn’t printing in the output section (Yes I have standard output messages visible)
if you are setting the camera’s position to the player’s position every frame via _physics_process then it’s going to follow the player every frame.
It seems like you are re-implementing the snappedf function, but missed a crucial step where ceil does not change the variable it’s operating on, only a copy is returned. you would need to set it equal to the result.
playerx = ceil(playerx)
Or use the snapped function.
var snap_step := Vector2(1152, 648)
var player_pos := character_body_2d.position.snapped(snap_step)
camera_2d.position = player_pos