characterbody2d jitters when standing still on moving platform
Godot 4.1.3, 2D platformer. My player is a CharacterBody2D with move_and_slide and when it stands on a moving platform (also a CharacterBody2D moving via velocity) the sprite jitters up and down by like 1 pixel every frame. The platform moves horizontally using velocity.x = 40 in _physics_process. Player has a floor snap of 8. I read somewhere that you need to add the platform's velocity to the player's velocity when standing on it. How do I detect the platform I'm standing on? get_slide_collision? I tried floor_constant_speed but that didn't fix the vertical jitter. Am I missing something obvious here?
4 replies