The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Why do my holograms fall through the floor?
They have a Rigidbody and a collider. My app opens, the holograms appear for a moment and then fall through the floor.
I'm sure I'm missing something so basic.
Best Answers
-
OptionsPatrick mod
Yeah, if you are running exactly as you describe then I would assume you aren't giving spatial mapping enough time to create the meshes that represent the floor.
===
This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.(Daddy, what does 'now formatting drive C:' mean?)
5 -
Optionsrunamuck ✭
Hi all - I figured it out. When the app is launching my objects initialize before the spatial mapping is completed. I figured out if I delay the spawning of the objects by a moment the spatial map is complete and the fall properly onto the floor instead of through it.
Thanks for the help!
5
Answers
This can be a complicated issue with Unity in general. Some things to check:
Is there a hole in your floor ?
@runamuck,
Are you using Spatial Mapping in your application? While the HoloLens is always scanning the environment, it is the responsibility of the application to request this data and create the appropriate GameObjects to represent this data.
I recommend taking a look at the Holograms 101 and Holograms 230 courses in the Holographic Academy for examples and additional information on Spatial Mapping.
Thanks!
David
Yeah, if you are running exactly as you describe then I would assume you aren't giving spatial mapping enough time to create the meshes that represent the floor.
===
This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.
(Daddy, what does 'now formatting drive C:' mean?)
Sounds like no collider on the floor.
The other time when colliders don't work well in Unity is on really fast moving small objects, if you have a small object moving fast then make sure to set Collision Detection -> Continuous Dynamic on the rigidbody rather than the default of Discrete.
Your spatial mesh might have holes that your rigidbodies fall into. Try getting a good area scan (Fragments is an awesome example of scanning UX), or design around the possibility of having holes in your mesh (e.g. game character dies when falling through holes).
As DavidKlineMS has suggested, try the portion of the tutorial in which the mesh is visible. You should be able to see what the HoloLens is perceiving.
The mesh is dynamically built from a sample of points, and the points it gets may change, so the mesh can move. It may sort of undulate over time. A ball on the floor may roll as portions of the mesh rise or fall beneath it, and if the mesh reforms above the ball, the ball may fall into the void beneath it.
Another possibility is a floor which doesn't clearly reflect the infrared dots which the HoloLens uses to scan for depth. If you were to shine a small flashlight onto a surface and not see a simple spot right where the beam intersects, that surface would likely fail to give a good scan. A pretty rough texture (a coarse carpet) or glassily or metallically reflective surface (a very shiny or sparkly floor) might do this.
Again, trying the mesh test should give you clues.
Hi all - I figured it out. When the app is launching my objects initialize before the spatial mapping is completed. I figured out if I delay the spawning of the objects by a moment the spatial map is complete and the fall properly onto the floor instead of through it.
Thanks for the help!
runamuck - Please share your solution, trying to do the same thing.
Hi @RobZelt - what I simply did was add a "placing" step at the beginning of my app (you can see the code from HoloLens Academy TapToPlaceParent.cs . So the objects I want in the environment appear floating before the user and they can place them into the room. This simple delay adds just enough time so that the HoloLens can map the room. You can see the code for this type of action in the HoloLens Acadamy TapToPlaceParent.cs https://developer.microsoft.com/en-us/windows/holographic/holograms_101e
This is my temporary workaround. What I am working on now is for the device to check for existing spatial data or rompt the user map their room before starting if it doesn't exist.