Moving-speed is slower by high FPS even I use Time.deltaTime

Moving-speed is slower by high FPS even I use Time.deltaTime

Here is my code:

    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
    }

    // Update is called once per frame
    void Update()
    {
        cameraPosX = cameraSpeedX * Time.deltaTime;
        cameraPosY = cameraSpeedY * Time.deltaTime;
        rb.velocity = new Vector2(cameraPosX, cameraPosY);

        //mainCamera.transform.position = new Vector3(cameraPosX, cameraPosY, mainCamera.transform.position.z);
    }

Velocity is already time independent, don’t use deltaTime in this case.

This code is writing the velocity of the rigibody instead of the position (as the name of the variables cameraPosX/Y indicate as your intention). Therefore I would expect that the engine will use your input to integrate the position according to the speed that. Since deltaTime decreases with FPS, then velocity that you are writing will be lower at higher FPS.
If you want to have a constant speed, the code should update directly the position. I see your commented code tried that originally

Got it, thanks!