Ejemplo n.º 1
0
    public void FocusOnSelected()
    {
        HashSet <Vertex> selPoints = selMesh.GetSelectedAsVertices();
        CameraMove       cam       = GameObject.Find("CameraPivot").GetComponent <CameraMove>();

        if (selPoints.Any())
        {
            cam.FocusOnPoint(selPoints.PositionAverage());
        }
        else
        {
            cam.FocusOnPoint(selMesh.meshFilter.transform.position);
        }
    }