Question: I am making a small game where the player is constantly moving upwards, and I am having slight problems with the movement to the sides.
The script located under works quite perfectly in itself, but my problem is that I want the balloon-player to nudge in a direction, rather than go at a constant speed. Kinda like a small punch to the side of the balloon. 

![enter image description here](https://i.stack.imgur.com/ANXJp.png)

How could I easily implement this? GetMouseButton or GetMouseButtonDown?
Thanks in advance. :)

```
    void Update () {

    transform.Translate(Vector3.up * Time.deltaTime, Space.World);

    if(Input.GetMouseButton(0))
        transform.Translate(Vector3.left * Time.deltaTime, Space.World);

    if(Input.GetMouseButton(1))
        transform.Translate(Vector3.right * Time.deltaTime, Space.World);

}

```

Answer: 
This looks like it would be something the physics system could fairly easily handle. I'd add a `Rigidbody2D` and then you can manipulate the balloon via the `AddForce` function. Note that in order to make the balloon "rise" you can get rid of your translate and instead set `GravityScale` to something like `-0.5` and it will "fall" but up.

So I'd do something like this:

```
void Update () 
{
    if(Input.GetMouseButtonDown(0))
    {
        rigidbody2D.AddForce(-Vector2.right);
    }
    else if(Input.GetMouseButtonDown(1))
    {
        rigidbody2D.AddForce(Vector2.right);
    }
}

```
What you need is a Velocity/Inertia system. Create an additional vector to represent the amount of "energy" in a given direction for the object - I call mine "Velocity". Every update, apply a percentage of the velocity to the position and subtract it from the velocity. Every time you hit a button to move, add to the velocity rather than directly moving the object.

It's a bit convoluted to set up but it works quite nicely and is the way its always done afaik.