So I've got a rigidbody2d, and when the player runs over it, it begins to follow the player.
using func integrateforces(state): I'm getting the correct direction, then applying an impulse in that direction * velocity.
Here's the code https://i.imgur.com/FVL8tI0.png
While the player's actively moving, everything is smooth and looks great, but the issue is that when the player stops and the rigidbodies catch up to their intended target, of course, is that since I'm applying an impulse every time the function updates, it causes them to jitter when they shouldn't be moving.
I need these rigidbody2ds to follow the player, but also be affected by area2d gravity traps which will try to suck the rigid bodies in and destroy them, and I'm completely at a loss as to how I can have them smoothly follow the player, but still be affected by gravity. I'm open to alternatives as well.
I scripted something similar in unreal engine (that updates every tick) and it didn't jitter when stationary, so while I can get seemingly why it's jittering, I can't think of a viable alternative.
Again, I'd really appreciate any help, because I've been tearing my hair out over this.