Skip to main content
deleted 101 characters in body
Source Link
public static List<Vector3> GetBoxColliderCornersWorld(BoxCollider boxCollider)
        {
            Vector3 size = boxCollider.size;
            List<Vector3> list = new();
            var signs = new List<int> { -1, 1 };
            signs.ForEach(signX => 
                signs.ForEach(signY => 
                    signs.ForEach(signZ => {
                        var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                        list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
                    })));

            return list;
        }
```
public static List<Vector3> GetBoxColliderCornersWorld(BoxCollider boxCollider)
        {
            Vector3 size = boxCollider.size;
            List<Vector3> list = new();
            var signs = new List<int> { -1, 1 };
            signs.ForEach(signX => 
                signs.ForEach(signY => 
                    signs.ForEach(signZ => {
                        var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                        list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
                    })));

            return list;
        }
```
public static List<Vector3> GetBoxColliderCornersWorld(BoxCollider boxCollider)
{
    Vector3 size = boxCollider.size;
    List<Vector3> list = new();
    var signs = new List<int> { -1, 1 };
    signs.ForEach(signX => 
        signs.ForEach(signY => 
            signs.ForEach(signZ => {
                var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
            })));

    return list;
}
added 4 characters in body
Source Link
        {
            Vector3 size = boxCollider.size;
            List<Vector3> list = new();
            var signs = new List<int> { -1, 1 };
            signs.ForEach(signX => 
                signs.ForEach(signY => 
                    signs.ForEach(signZ => {
                        var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                        list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
                    })));

            return list;
        }```
public static List<Vector3> GetBoxColliderCornersWorld(BoxCollider boxCollider)
        {
            Vector3 size = boxCollider.size;
            List<Vector3> list = new();
            var signs = new List<int> { -1, 1 };
            signs.ForEach(signX => 
                signs.ForEach(signY => 
                    signs.ForEach(signZ => {
                        var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                        list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
                    })));

            return list;
        }
```
        {
            Vector3 size = boxCollider.size;
            List<Vector3> list = new();
            var signs = new List<int> { -1, 1 };
            signs.ForEach(signX => 
                signs.ForEach(signY => 
                    signs.ForEach(signZ => {
                        var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                        list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
                    })));

            return list;
        }```
public static List<Vector3> GetBoxColliderCornersWorld(BoxCollider boxCollider)
        {
            Vector3 size = boxCollider.size;
            List<Vector3> list = new();
            var signs = new List<int> { -1, 1 };
            signs.ForEach(signX => 
                signs.ForEach(signY => 
                    signs.ForEach(signZ => {
                        var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                        list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
                    })));

            return list;
        }
```
Source Link

        {
            Vector3 size = boxCollider.size;
            List<Vector3> list = new();
            var signs = new List<int> { -1, 1 };
            signs.ForEach(signX => 
                signs.ForEach(signY => 
                    signs.ForEach(signZ => {
                        var vector = new Vector3(size.x * signX, size.y * signY, size.z * signZ);
                        list.Add(boxCollider.transform.TransformPoint(boxCollider.center + vector * 0.5f));
                    })));

            return list;
        }```