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

MRDesignLabs Bounding Box #74

Closed tspaddock closed 6 years ago

tspaddock commented 6 years ago

I need help please and I ask you to be patient with me. This is very concerning to me because I do not know what is going wrong and this is something I need to implement into my projects ASAP. I have been trying for almost a month to try to get the bounding box to function and I am not successful. I have followed everything that I can reference online to get this bounding box to function and nothing seems to be helping. I have set it up before but only with a simple 3D box element, The way I have set things up is by putting the Appbar and Bounding box into the main hierarchy. Then I have added the Box Collider, Bounding Box Target and Compound Button to the parent layer of an imported FBX asset. This FBX prefab within my hierarchy has multiple layers of child objects. The Hololens prefab is also within my hierarchy. Please let me know what else I should be adding or give me some ideas as to what I could look for. Thank you! @Railboy has helped me before regarding this issue.

freekpixels commented 6 years ago

Does the collider box you assign to the object have the right size? It might just be 1x1x1 if there is no mesh in the parent of the fbx meshes.

Railboy commented 6 years ago

Hi tspaddock - you haven't described the specific problem. Does the bounding box fail to appear when clicking the target? Is it sized wrong?

I'm going to assume the bounding box fails to appear when clicking the target. If that's the case, it may be a problem with getting your InteractableObject set up to recognize input events.

The first thing I would do is select the FocusManager component inside the Hololens prefab and look at your FocusManager's RaycastLayerMask and FilterTags settings. Check these values against the target's GameObject layer and FilterTag (located in the CompoundButton component).

It may also be a problem with focus being occluded by an invisible object. You can check this during play mode by selecting the HoloLens Focuser object, located under HoloLens->FocusManager->HoloLens Focuser. Set your inspector to debug mode and check the PrimeFocus backing field. If it's set to something other than the GameObject you're looking at, check the scene for wayward colliders that could be blocking your gaze.

Lastly, you say you have a working setup - have you tried dragging your FBX asset into that working setup?

tspaddock commented 6 years ago

Hi, Thank you for your response. I have been able to insert the bounding box however I needed to rebuild the whole project. The problem that I had was that the bounding box and appbar would not show up at all. I installed it the exact same way into my new project and now it works!? I am currently tweaking it to make it the way I want it. I do have one more question... When I resize the bounding box to a large size the appbar sometime remains within the bounding box, and unaccessible to use via hand or voice gesture. The only way that I can get access to it is by rotating the box. Then the appbar will pop outside the box and become accessible to use. I can not have this because some objects that I make may need to be enlarged and/or rotated. Thanks in advance

tspaddock commented 6 years ago

Please take a look at this video so that you can see the struggles I am having with the bounding box. As you can see the appbar is either on the top of the hologram or on one of two sides or within the hologram. Also take notice how difficult it is to manipulate it. Sometimes I have to pinch and drag one way sometimes the other to achieve the same thing. Any ideas why this is happening? Thanks! https://youtu.be/QrJ7SADUOcA

paseb commented 6 years ago

Hi @tspaddock,

Based on the video I would start with looking at the log. The framerate looks indicative of errors dumping to the log. You can find the logs C:\Users[your user]\AppData\Local\Packages[Applications]\LocalState and find UnityPlayer.log. You also don't have the correct font downloaded for the project as the glyphs aren't there. Again the ManipulationManager is the only thing you need in the scene so do not place BoundingBoxShell or AppBar in the actual scene as they are instantiated.

thanks, -pat

tspaddock commented 6 years ago

Thank you for your input paseb! In order for me to have things function properly I took my hologram and inserted it into the MRDesignLabs ManipulationGizmo_Example to see the correct configuration based off of your comments. The hologram is now stabilized and with the correct font, however there is still one major issue. When I increase the size of the hologram the appbar gets inserted into the bounding box. (This also happens to the example holograms) Is there any way that I can make sure the appbar always stays outside of it? Also, when the hologram is smaller the appbar only appears on two opposite side axis and the top and bottom of axis. I would like the appbar to be only on the side axis. Any help would be appreciated!

tspaddock commented 6 years ago

I am assuming that there is not a fix for this? I wish the MRDLs bounding box was much more functional. If anyone knows and alternative please let me know? Maybe I am still doing it wrong?? Please let me know. Thanks!

lucArm23 commented 6 years ago

Hi @tspaddock, I have the same problem, I imported MRDesignLabs and Holotoolkit assets in my project and tried to interact a simple 3D cube. In game all works, but when I deploy on hololens App Bar and Bounding Box don't appear. How did you solve? I'm using the Unity 2017.2 branch with Unity 2017.2.0f3.

Thanks

tspaddock commented 6 years ago

The issue that I was having was that my gameobject was originally imported into the scene from an fbx prefab file. I did not break the prefab file and this caused a huge amount of issues in coding! As soon as I broke the prefab and created new gameobjects for each elements things started to work for me.

Zulex commented 6 years ago

@lucArm23 Did you get to fix your issue? Im having exactly the same issue: Being able to see the bounding box in unity but not on the HoloLens after tapping. Also using the 2017.2 branch on unity 2017.2.0f3.

Let me know please!

lucArm23 commented 6 years ago

@Zulex I downgraded to Unity 2007.1 and used MRDLabs for that version. Now everything works, I think the last version has some issues.

Railboy commented 6 years ago

Quick update, we're still in the process of migrating our MRDL controls over to MRTK and stabilizing our Unity 2017 MR/XR support. It's taking longer than expected, but the Bounding Box control is a top priority and it's driving a lot of the changes we're making to MRTK's input system. Once the chaos of the 2017 switch has died down and the new bounding box control is finished we'll be able to troubleshoot more effectively.

tspaddock commented 6 years ago

Thank you for the update! I will keep my eye on any updates. If possible please keep this thread informed of the bounding box control release.