transform.rotation an input.touchCount not working properly

Hi, I wrote this code to make the player turn on itself if I touch(clockwise right, anticlockwise left) the screen till it is game over. I also wanted that when I don’t touch the screen it also rotates at a less speed clockwise.

The problem is that when I touch on the left side of the screen the rotational speed is not the same as when I touch right.

There is the code :

public float moveSpeed = 75f;
    public float moveS = 25f;
    float movement = 0f;
    public bool gameOver = false;
    public static Movimento current;
    bool destra = false;
    bool sinistra = false;

    void Awake()
    {
        if (current == null)
            current = this;
    }

    // Update is called once per frame
    void Update()
    {
       
        if (!gameOver)
        {
            movement = Input.GetAxisRaw("Horizontal");

            if (Input.touchCount > 0)
            {
                int tocco = Input.touchCount;
                int toc = tocco - 1;
                Touch touch = Input.GetTouch(toc);

                if (touch.phase == TouchPhase.Began)
                {
                    if (touch.position.x < Screen.width / 2)
                    {
                        destra = true;
                        sinistra = false;
                    }

                    if (touch.position.x > Screen.width / 2)
                    {
                        destra = false;
                        sinistra = true;
                    }
                }
            }
            else
            {
                destra = true;
                sinistra = true;
            }

        }
    }

    private void FixedUpdate()
    {
        if (gameOver)
            transform.RotateAround(Vector3.zero, Vector3.forward, 0f * Time.fixedDeltaTime * -moveSpeed);
        if (!gameOver)
        {

            transform.RotateAround(Vector3.zero, Vector3.forward, movement * Time.fixedDeltaTime * -moveSpeed);
            if (destra && !sinistra)
            {
                transform.RotateAround(Vector3.zero, Vector3.forward, -1 * Time.fixedDeltaTime * -moveSpeed);
            }
            else if (sinistra && !destra)
            {
                transform.RotateAround(Vector3.zero, Vector3.forward, 1 * Time.fixedDeltaTime * -moveSpeed);
            }
            else if (destra & sinistra)
                transform.RotateAround(Vector3.zero, Vector3.forward, 1 * Time.fixedDeltaTime * -moveS);
        }
    }

destra means right
sinistra means left

thanks

the problem is maybe due to your center of rotation.
if it’s not exactly in the middle, you’ll get speed discrepancies between the two sides.

you are rotating around (0,0,0), can you confirm that this point is indeed lying in the center of your screen?
besides you can always test all your assumptions by placing Debug.Log() and checking the actual values.

this is called debugging and is a normal part of development.
rare is a situation when everything works immediately the first time you hit play.
test your assumptions and then come back with a real problem.

yes sure that it is rotating around 0,0,0… it is not even the problem… I already did you you told because guess what? I’m not a beginner.

So come back with a real solution.

okay, maybe you want to help me instead
how about I have a problem with your ego rotating around (0,0,0), and you try to address this someplace else

in any case, if you’re not a beginner and I have no reasons not to trust you, with such an ego you’re likely an expert in C#, so I’m sure you’ve heard about debugging and how it’s done right? go fetch some data, because this is insufficient in my opinion. we are not clairvoyant is all I’m saying. with the best of intentions.

Thanks to my ego, now also the player rotates well… not thanks to you…

At least I’m able to develop.

Well I’m glad for you regardless.