I'm currently working on a 2D platformer, but I've run into a big roadblock. My previous movement system used Get Axis and Set Velocity 2D to move the player left and right. This worked fine... Except when outside forces needed to affect the player.
I've tried a few workarounds now, such as making a state that had no such set velocity, for whenever they were being pushed. The issue with that, was that as soon as they exited that state, it would immediately set the X velocity to 0 and stop any momentum.
The solution I'm currently working on, is to use Add Force 2D instead, but that brings its own problems. Since Force is a constant acceleration, it quickly gets to obscene speeds. I can't figure out how to actually limit that speed with the clamp actions available. I also need to decelerate back to zero when there is no input, but drag makes it feel like walking on ice.
Can anyone help me find a solution for this? Ideally, my goal is to have snappy left and right movement that can be affected by outside forces. I've tried all I know to do, and keep hitting barriers. I don't have much coding knowledge either, so Playmaker is all I really know how to use. Any help at all is appreciated.