FindFreePlace
Summary
public Vector3D? FindFreePlace(Vector3D basePos, float radius, int maxTestCount, int testsPerDistance, float stepSize)
Use to find place that doesn't have any voxels, grids, or physical bodies. If original position can't fill check sphere, new position in some distance is picked. Distance grows each testsPerDistance attempts. Maximum distance from BasePos that can be used is calculated by formula: maxTestCount / testsPerDistance * radius * stepSize
Returns
Position that can doesn't have voxels, grids and other HkBodies in provided radius