1. Tried search, but couldn't find anything.

    I want to destroy all foundations and stone walls within a set radius of a location.
     
  2. Last edited by a moderator: Aug 7, 2017
  3. Anyone have any examples of SphereCast that i could have a look at, or knows of a plugin that uses it?
     
  4. You can also try using this code:
    Code:
          Vector3 position = new Vector3(x, y, z);
           float distance = 30f;
           List<BaseEntity> nearby = new List<BaseEntity>();
           Vis.Entities<BaseEntity>(position, distance, nearby);
           foreach(BaseEntity entity in nearby.Distinct().ToList())
           {
             if (entity.PrefabName.Contains("foundation")) entity.Kill(BaseNetworkable.DestroyMode.Gib);
           }
                
     
    Last edited by a moderator: Aug 8, 2017
  5. Tkae a look at my Building Blocker for Rust | Oxide - I've switched to another in-game function, but there is 2 examples commented: Using pool and Physics.OverlapSphereNonAlloc. Both can work in your case
     
  6. Was my answer not good enough for you? ;)
     
  7. HAHA yes it was :) Thanks for your help!