// Update is called once per frame
    void Update()
    {
        float movement = Input.GetAxis("Horizontal");

        doMovement(movement);
        float jumpValue = Input.GetAxisRaw("Jump");

        doJump(jumpValue);

        //drink water
        if (Input.GetAxisRaw("water") < -0.1f)
        {
            if (currentBottles > 0 && !hasDrunk)
            {
                setWater(maxWater);
                hasDrunk        = true;
                currentBottles -= 1;
                bottleHandler.setBottles(currentBottles);
            }
        }
        //give water to fairy
        else if (Input.GetAxisRaw("water") > 0.1f)
        {
            if (!hasDrunk && currentBottles > 0)
            {
                fairy.GiveWater(fairy.MaxWaterMeter);
                hasDrunk        = true;
                currentBottles -= 1;
                bottleHandler.setBottles(currentBottles);
            }
        }
        else
        {
            hasDrunk = false;
        }

        // Notify the animator of our velocity
        playerAnimationController.InformVelocity(body.velocity);

        //lock player to circle
        Vector3 rawPosition     = new Vector3(transform.position.x, 0, transform.position.z);
        Vector3 clampedPosition = rawPosition.normalized * playerDistance;

        clampedPosition.y = transform.position.y;

        transform.position = clampedPosition;

        //move camera
        Vector3 cameraPosition = rawPosition.normalized * cameraDistance;

        cameraPosition.y = transform.position.y + 0.5f;
        if (cameraSmoothing)
        {
            //artificially move camera further down to have a dip when the player lands
            if (Mathf.Abs(body.velocity.y) < cameraDipThreshold)
            {
                cameraPosition.y += amountToDip;
                amountToDip      *= cameraDipDampening;
            }
            else if (body.velocity.y > cameraDipThreshold)
            {
                amountToDip = 0.0f;
            }
            float distToMove = (cameraPosition - mainCamera.transform.position).magnitude;

            if (distToMove > 1)
            {
                timeSinceCentered += Time.deltaTime;
            }
            else
            {
                timeSinceCentered = 0;
            }

            float movementPower = smoothCameraBaseSpeed + Mathf.Clamp(timeSinceCentered, 0, smoothCameraMaxSpeed - smoothCameraBaseSpeed);

            Vector3 newPos = (cameraPosition - mainCamera.transform.position) * movementPower + mainCamera.transform.position;

            mainCamera.transform.position = newPos;
            mainCamera.transform.LookAt(this.transform);
        }
        else
        {
            mainCamera.transform.position = cameraPosition;
            mainCamera.transform.LookAt(this.transform);
        }

        if (transform.position.y > 77.4 && transform.position.x < -12.4 && !goneToStart)
        {
            Invoke("goToStart", 2);
            goneToStart = true;
        }
    }