コード例 #1
0
    void OnInputMouseDown(int buttonID, Vector3 position)
    {
        lastMousePosition = position;

        if (buttonID == 1)
        {
            mouseSecondaryBtnPressed = true;
            freeCameraController.StartDectectingMovement();
        }

        if (buttonID != 0)
        {
            return;
        }

        dragStartedPoint = raycastController.GetFloorPointAtMouse(position);

        if (isSnapActive)
        {
            dragStartedPoint.x = Mathf.Round(dragStartedPoint.x);
            dragStartedPoint.z = Mathf.Round(dragStartedPoint.z);
        }

        if (isPlacingNewObject)
        {
            return;
        }

        var entity = raycastController.GetEntityOnPointer();

        if ((entity == null ||
             (entity != null && !entity.IsSelected)) &&
            !BIWUtils.IsPointerOverMaskElement(BIWSettings.GIZMOS_LAYER))
        {
            isSquareMultiSelectionInputActive = true;
            outlinerController.SetOutlineCheckActive(false);
        }

        mouseMainBtnPressed = true;
        freeCameraController.SetCameraCanMove(false);
    }
コード例 #2
0
    void OnInputMouseDown(int buttonID, Vector3 position)
    {
        lastMousePosition = position;

        if (buttonID == 1)
        {
            mouseSecondaryBtnPressed = true;
            freeCameraController.StartDectectingMovement();
        }

        if (buttonID != 0)
        {
            return;
        }

        dragStartedPoint = GetFloorPointAtMouse(position);

        if (isPlacingNewObject)
        {
            return;
        }

        var entity = builderInWorldEntityHandler.GetEntityOnPointer();

        if ((entity == null ||
             (entity != null && !entity.IsSelected)) &&
            !BuilderInWorldUtils.IsPointerOverMaskElement(layerToStopClick))
        {
            isSquareMultiSelectionInputActive = true;
            isTypeOfBoundSelectionSelected    = false;
            isVoxelBoundMultiSelection        = false;
            outlinerController.SetOutlineCheckActive(false);
        }
        mouseMainBtnPressed = true;
        freeCameraController.SetCameraCanMove(false);
    }