Vector3 ProjectPoint(Vector3 worldPoint, Vector3 worldDirection)
        {
            bool    hasTerrainHit = false;
            Vector3 terrainHit;

            worldPoint = worldPoint - (worldDirection * 3f);
            if (ProceduralUtils.TryRaycastTerrain(worldPoint, worldDirection, out terrainHit, collideNetworksBuildings))
            {
                hasTerrainHit = true;
            }

            RaycastHit physicsHit;

            if (Physics.Raycast(new Ray(worldPoint, worldDirection), out physicsHit, 2000))
            {
                if (physicsHit.collider.gameObject.name.StartsWith("PO_ColliderProject"))
                {
                    var point = physicsHit.point;
                    if (hasTerrainHit)
                    {
                        if ((point - worldPoint).sqrMagnitude < (terrainHit - worldPoint).sqrMagnitude)
                        {
                            return(point);
                        }
                        else
                        {
                            return(terrainHit);
                        }
                    }
                    else
                    {
                        return(point);
                    }
                }
            }

            if (hasTerrainHit)
            {
                return(terrainHit);
            }
            else
            {
                return(worldPoint);
            }
        }