Example #1
0
    private void UpdateForSphere(Vector3 wpos)
    {
        reticleSpherical.EnableRenderer(true);
        reticleSpherical.SetPositionAndSize(wpos, BrushSize);

        if (clicking && Terrain.OperationsManager.IsReadyToComputeAsync)
        {
            Terrain.OperationsManager
            .Add(Sphere.CreateFromUnityWorld(Terrain, dig, wpos, BrushSize, voxelType), true)
            .PerformAll(asyncOperations);
        }
    }
    protected virtual IOperation CreateOperationFromEditor(Vector3 worldPosition, TerrainToolEditor editor)
    {
        var voxelType = EditorUtils.GetVoxelTypeFromIndex(VoxelTypeIndex, editor.Terrain.VoxelTypeSet);

        return(Sphere.CreateFromUnityWorld(editor.Terrain, Dig, worldPosition, Radius, voxelType));
    }