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.

Prevent hologram from interacting with spatial mapped environment

I have a simple test, in which I have a hologram of a ball bouncing on a platform. I use spatial mapping to move the platform and place it in the environment. In unity the ball is a child of the platform so that when I move and place the platform the ball moves with it. However when I move the platform around, the ball interacts with the spatially mapped environment and gets distorted, deformed or thrown around. How do I prevent it from being affected by the environment and just continue bouncing on the platform. I have already implemented layer based collision detection and frozen some movement axis, but the ball continues to get distorted as soon as it hits any of the surfaces in the spatial environment.


  • Hey, @shekit

    One way would be to remove the spatial mapping collider altogether if you won't need it for something else.

    Another would be to disable cross-collisions between the layer where spatial mapping collider is (probably SpatialMapping) and the layer where you ball is (probably Default). This can be done in Edit->Project Settings->Physics->Layer Collision Matrix.


    Building the future of holographic navigation. We're hiring.

  • Hey @stepan_stulov, thanks for the response! I do need spatial mapping for the platform, just don't need it for the ball bouncing on that platform.

    I did however follow your suggestion:

    • placed spatial mapping on its own layer
    • added the ball on its own layer
    • switched off collision between the spatial layer and ball layer
    • left collision on between the platform layer and spatial layer

    However the issue still persists, the ball still gets affected by the mapping.

  • This is the matrix if it helps.

    -The ball is on the nocollision layer
    -Spatial mapping is on the spatialmap layer
    -The platform(that the ball bounces on) is on layer1

  • Hey, @shekit

    SpatialMapping is a special beast. I usually create SpatialMapping layer at 31 and there are two places to specify that layer at: the first is the game object that contains the SpatialMappingCollider component and the second one something like Mesh Layer within the component itself. Don't forget both.

    Building the future of holographic navigation. We're hiring.

Sign In or Register to comment.