So, I'm using
motion for player movement and I want to do a spring that pushes the player to a side
I tried using
body.motion.x += pushforce
body.motion = body.move_and_slide(motion,Vector2.UP)
It works, but it pushes instantly rather than in a smooth way, making it look like it was teleported. How it can be smooth?