Camera moves very slow

The camera is a very slow even if i change the speed:
if (Input.mousePosition.x > theScreenWidth - Boundary)
{
transform.position += Vector3.right * Time.deltaTime * speed;
}

What should i do to move the camera faster?

Why not use

transform.Translate(Vector3.right * Time.deltaTime * speed);

Make “speed” a bigger number…

Its always the same speed whatever the speed is

then I’m guessing at some point you are setting speed to a value in the code and overwriting whatever inspector value you have.

im only use it once

how about you post your entire code so we can actually see what you’re doing fully, because so far your statements about what it’s doing, and that tiny snippet don’t add up… :face_with_spiral_eyes:

It’s from this:

    public int Boundary = 50;
    public int speed = 1000;

void Update()
    {
        //updating input
        GetInput();

        //zooming
        if (position.allowZoom)
            Zoom();
        //rotating
        if (orbit.allowYOrbit)
            Rotate();
        //panning
        PanWorld();
    }

    void PanWorld()
    {
        if (Input.mousePosition.x > theScreenWidth - Boundary)
        {
            transform.Translate(Vector3.right * Time.deltaTime * speed); // move on +X axis
        }
        if (Input.mousePosition.x < 0 + Boundary)
        {
            transform.position -= Vector3.right * speed * Time.deltaTime; // move on -X axis
        }
        if (Input.mousePosition.y > theScreenHeight - Boundary)
        {
            transform.position += Vector3.forward * speed * Time.deltaTime; // move on +Z axis
        }
        if (Input.mousePosition.y < 0 + Boundary)
        {
            transform.position -= Vector3.forward * speed * Time.deltaTime; // move on -Z axis
        }
    }