Camera2D camera = new Camera2D(){ target = new Vector2(x + ((screenWidth / 2) + width), y + ((screenHeight / 2) + height)), offset = new Vector2(screenWidth, screenHeight), rotation = 0.0f, zoom = 1.0f, }; while (!WindowShouldClose()) { BeginDrawing(); ClearBackground(RAYWHITE); BeginMode2D(camera); Endmode2D(); EndDrawing(); }