“UV pixel mapping” a projection onto a planet

My problem is that i try to “UV map” an unwrapped jupiter onto points on a sphere and i did that but the texture doesnt rotate (just occasionaly flips 180, to be exact i see the poles of the planet) with the sphere, And i know i have a wierd system but i like the look and vibe of this. My code is janky and some parts are obsolete but for now i dont need to change that

using UnityEngine;
using UnityEngine.UI;

public class MakeSemiSphere : MonoBehaviour
{
    public int numPoints = 100; // Number of points to generate
    public int RedPointPrc = 10;
    public float radius = 1.0f; // Radius of the sphere
    public float angle1;
    public float angle2;
    public float angle3;

    public Texture2D PlanetTexture;
    public RawImage image;

    private Texture2D OutputTexture;

    private void MakeTextureBlack()
    {
        OutputTexture = new Texture2D(100, 100);
        OutputTexture.filterMode = FilterMode.Point;
        for (int i = 0; i < 100; i++)
        {
            for (int j = 0; j < 100; j++)
            {
                OutputTexture.SetPixel(i, j, Color.black);
            }
        }
        OutputTexture.Apply();
    }

    void Update()
    {
        if (Input.GetKey(KeyCode.Space))
        {
            MakeTextureBlack();

            for (int i = 0; i < numPoints; i++)
            {
                Vector3 v = GeneratePointOnSphere(i, numPoints, radius);
                Vector3 rotatedV = RotatePoint(v, angle1, angle2, angle3);

                // Scale and center the point on the 2D plane
                Vector2 FlatPoint = new Vector2(rotatedV.x, rotatedV.y);

                // Calculate spherical coordinates
                float theta = Mathf.Atan2(rotatedV.y, rotatedV.x);
                if (theta < 0)
                    theta += 2 * Mathf.PI;
                float phi = Mathf.Acos(rotatedV.z / radius);

                // Normalize Theta and phi to [0, 1] range
                float u = theta / (2 * Mathf.PI);
                float vNorm = phi / Mathf.PI;

                // Map to texture coordinates
                int x = Mathf.RoundToInt(u * (PlanetTexture.width - 1));
                int y = Mathf.RoundToInt((1 - vNorm) * (PlanetTexture.height - 1));

                // Clamp coordinates
                x = Mathf.Clamp(x, 0, PlanetTexture.width - 1);
                y = Mathf.Clamp(y, 0, PlanetTexture.height - 1);

                // Sample pixel color from PlanetTexture
                Color pixelColor = PlanetTexture.GetPixel(x, y);

                // Determine color intensity based on distance from center
                float colorIntensity = GetHowFarFromCenter(FlatPoint);

                // Blend colors based on RedPointPrc threshold
                if (i < numPoints * RedPointPrc / 100)
                {
                    // Red point
                    OutputTexture.SetPixel(Mathf.RoundToInt(FlatPoint.x + 50), Mathf.RoundToInt(FlatPoint.y + 50), Color.red * colorIntensity);
                }
                else
                {
                    // Sampled texture color
                    OutputTexture.SetPixel(Mathf.RoundToInt(FlatPoint.x + 50), Mathf.RoundToInt(FlatPoint.y + 50), pixelColor);
                }
            }

            // Apply changes to OutputTexture and update RawImage
            OutputTexture.Apply();
            image.texture = OutputTexture;

       
            angle1++;
            angle2 += 3;
            angle3 += 2;
        }
    }

    Vector3 RotatePoint(Vector3 point, float angleX, float angleY, float angleZ)
    {
        // Convert angles to radians
        float angleXRad = Mathf.Deg2Rad * angleX;
        float angleYRad = Mathf.Deg2Rad * angleY;
        float angleZRad = Mathf.Deg2Rad * angleZ;

        // Rotate around X axis
        Vector3 rotated = new Vector3(
            point.x,
            point.y * Mathf.Cos(angleXRad) - point.z * Mathf.Sin(angleXRad),
            point.y * Mathf.Sin(angleXRad) + point.z * Mathf.Cos(angleXRad)
        );

        // Rotate around Y axis
        rotated = new Vector3(
            rotated.x * Mathf.Cos(angleYRad) + rotated.z * Mathf.Sin(angleYRad),
            rotated.y,
            -rotated.x * Mathf.Sin(angleYRad) + rotated.z * Mathf.Cos(angleYRad)
        );

        // Rotate around Z axis
        rotated = new Vector3(
            rotated.x * Mathf.Cos(angleZRad) - rotated.y * Mathf.Sin(angleZRad),
            rotated.x * Mathf.Sin(angleZRad) + rotated.y * Mathf.Cos(angleZRad),
            rotated.z
        );

        return rotated;
    }

    float GetHowFarFromCenter(Vector2 vector)
    {
        Vector2 HowFar = new Vector2(50 - vector.x, 50 - vector.y);
        HowFar /= 50;
        return HowFar.magnitude;
    }

    Vector3 GeneratePointOnSphere(int index, int totalPoints, float radius)
    {
        // Golden ratio
        float phi = (1 + Mathf.Sqrt(5)) / 2;

        // Calculate spherical coordinates
        float theta = 2 * Mathf.PI * index / phi;
        float z = 1 - (2 * index + 1) / (float)totalPoints;
        float radiusXY = Mathf.Sqrt(1 - z * z);

        float x = radiusXY * Mathf.Cos(theta);
        float y = radiusXY * Mathf.Sin(theta);

        // Convert to Cartesian coordinates
        return new Vector3(x, y, z) * radius;
    }
}

I tried most of the things that would come to mind but im 100% sure that i just mist one line or didnt change a variable but im going blind from looking at the code

what i tried:
changing the rotation matrix,
making sure i writen the phi and theta projections right
changing the sample method

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật