how do i get the points on a gamobject collider when it rotating ?

    boundPoint1 = collider.bounds.min;
     boundPoint2 = collider.bounds.max;
     boundPoint3 = Vector3(boundPoint1.x, boundPoint1.y, boundPoint2.z);
     boundPoint4 = Vector3(boundPoint1.x, boundPoint2.y, boundPoint1.z);
     boundPoint5 = Vector3(boundPoint2.x, boundPoint1.y, boundPoint1.z);
     boundPoint6 = Vector3(boundPoint1.x, boundPoint2.y, boundPoint2.z);
     boundPoint7 = Vector3(boundPoint2.x, boundPoint1.y, boundPoint2.z);
     boundPoint8 = Vector3(boundPoint2.x, boundPoint2.y, boundPoint1.z);

i tried this , but it does not compensate for when the gameobject is rotating

Unity’s bounds are axis aligned bounding boxes (AABB) so they are not rotating. They should be used to get the approximate position/volume of the object. You need to calculate the rotation yourself.

It would help if I knew what you are trying to do.

But if you need the rotated points of that collider/bounding box, one simple way would be to capture the mesh bounds from the unrotated object, then get the extents of the object as points (like you have now).

Now that you have the points, you can use a matrix to rotate the points or I think easier way would be to use TransformPoint to translate those points so that they take into account the object rotation.

Ive got exactly the same problem…

I need the 4 points of the boxcollider corners, but it doesnt work because of rotation.