I have a perfectly aligned sprite and CollisionArea2D making a moving platform in Godot. Even so, a RigidBody2D sitting on top of the platform seems to sink into the kinematic body.
https://i.stack.imgur.com/VkU07.png
As you can see, the ball has penetrated inside the block. The ball is a RigidBody2D with default properties and gravity. The red block is a kinematic body that moves vertically.
Here is the kinematic body:
extends KinematicBody2D
var speed=100
func _physics_process(delta):
move_and_slide(Vector2(0,-speed))
If I set slow speed low, like below 50, it doesn't penetrate. How can I remove the penetration at higher speeds?