microsoft / MixedRealityDesignLabs_Unity

Mixed Reality Design Labs share experimental samples, explorations and learning from Windows Mixed Reality Design group. If you are looking for official toolkit, please use Mixed Reality Toolkit
MIT License
408 stars 110 forks source link

InteractibleObject not tap-table after Bounding Box Manipulation #84

Closed Tachoron closed 6 years ago

Tachoron commented 6 years ago

If you have a InteractibleObject which is simultaneously a BoundingBoxTarget and you select Adjust to modify this element and accept the changes with Done, you cannot tap the object after that, because the BoundingboxShell->Scale->Drag element is still enabled.

I did a dirty quick fix in BoundingBoxManipulate.cs , but i'm sure there is a better way to fix this at another place:

       public bool AcceptInput
        {
            get
            {
                return acceptInput;
            }
            set
            {
                if (value & !acceptInput)
                {
                    // Reset to drag operation
                    CurrentOperation = OperationEnum.Drag;
                }

                if(!value & acceptInput)
                {
                    manipulatingNow = false;
                    //Dirty Quickfix:
                    foreach (GameObject handle in Interactibles)
                    {
                        handle.SetActive(false);
                    }
                }

                acceptInput = value;
            }
        }
andy3hg commented 6 years ago

Thanks for the solution.