Hello everyone.

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.
Options

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

Answers

  • Options
    Jarrod1937Jarrod1937 ✭✭✭

    This can be a complicated issue with Unity in general. Some things to check:

    • Are your colliders above the floor? If the collider is already partially through the floor when it starts, the mesh may fall through.
    • Since you have rigid bodies and colliders, I assume you're relying on physics for the collision to keep them above the floor. As such, make sure you're not defining transforms that will violate what the physics is trying to do. For example, telling the mesh to go through the floor, even by a fraction.
    • Are these holograms colliding with the spatial mesh and that is what you're expecting to keep them above the floor? If so, are you do planar processing? The raw spatial data is pretty rough, and can even contain holes in the mesh, which can lead to things falling through. You'll want to do the plane finding processing, as this will give a nice even plane to collide against.
  • Options

    Is there a hole in your floor :p ?

  • Options

    @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

  • Options
    edited May 2016

    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.

  • Options
    ContextVRContextVR ✭✭✭

    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).

  • Options

    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.

  • Options

    runamuck - Please share your solution, trying to do the same thing.

  • Options

    @RobZelt said:
    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.

Sign In or Register to comment.