void FreeAxis(EnumFreeAxis _axis)
    {
        if (!snapToFace)
        {
            cam.Block2Axis(_axis);
        }

        else
        {
            cam.Block2Axis(_axis, col.center.x + transform.position.x, col.center.y + transform.position.y, col.center.z + transform.position.z);
        }
    }
예제 #2
0
    public void Block2Axis(EnumFreeAxis _axis, float _snapPointX = 0, float _snapPointY = 0, float _snapPointZ = 0)
    {
        state         = CameraManagerState.moving;
        lookingTarget = false;
        freeAxis      = _axis;

        snapPoint = new Vector3(_snapPointX, _snapPointY, _snapPointZ);

        if (snapPoint == Vector3.zero)
        {
            snap = false;
        }
        else
        {
            snap = true;
        }
    }
예제 #3
0
 public void UnBlockAllAxis()
 {
     freeAxis      = EnumFreeAxis.none;
     state         = CameraManagerState.idle;
     lookingTarget = true;
 }