How would i apply instant forces on my player/character for instant change of direction and responsiveness?

EDIT: I’m usinc C# but if you’re can answer me only in Java that’s okay, ill try to figure out how to do it in C#.

Hey, i’m pretty new to scripting and i’m having some trouble with the movement of my player.

I’ve been trying to get him to move/change directions(left/Right) instantly but i haven’t had any luck, using addforce isn’t giving me the instant, responsive change i want and with velocity i managed to come close to what i wanted i don’t really want to use velocity because of all the issues it apparently creates with other objects and physics.

Picture below shows what im trying to do, sorry for the bad paint skills but it might make it easier for you guys.

  1. I want my player to start “falling” at a constant speed without accelerating and i’d like to be able to move left and right instantly (Can’t figure out how to do that using AddForce), i also want to be able to add a force in the opposite direction to “brake”

  2. I want to have an object pick-up that when picked up instantly ads X amount of speed to my player for a few seconds,

Here is the Picture of what im after in the simplest form i could come up with

Use impulse forces which adds the force to the velocity immediately.

When using Rigidbody or Rigidbody2D ‘AddForce’ you can specify a ForceMode or ForceMode2D.

You can use Impulse on both 2D & 3D.

On 3D you can also use Velocity Change which adjusts the velocity without the mass.

Really though; all it’s doing is taking the current velocity, adding some value to it and then setting it back. You can do this with the Rigidbody/Rigidbody2D.velocity property yourself as well. If you simply write over the velocity ignoring what was in it before then you’re stomping on velocity that may have been added to stop a collision or gravity which is why it’s bad to do so. It doesn’t mean you can’t change velocity, just be mindful of how you change it.