Spatial Mapping won't activate Hololens2 UE4

Ragiarc 6 Reputation points
2022-01-31T20:20:59.163+00:00

I've been trying to get spatial mapping to activate for my hololens 2 project in Unreal Engine 4.27.2 for a few days now. I've closely followed the instruction here: https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unreal/unreal-spatial-mapping#spatial-mapping-at-runtime to no avail.

My hololens platform settings has the spatial perception box ticked.
My ar session (which is otherwise working) has all of the world mapping options ticked except for "Track scene objects".
My pawn activates the Ar session and calls ToggleARCapture with the on/off box checked.
I added the "AugmentedReality","MRMesh" strings to build file.
My ARTrackableNotify never fires its On Update Tracked Geometry event
Changing around my Spatial Meshing Volume Size has no effect.

Any help would be appreciated.

HoloLens | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Franklin Chen 1 Reputation point Microsoft Employee Moderator
    2022-02-07T09:05:37.633+00:00

    Hi Ragiarc,

    Sorry for the late response, I just got back to office and have chance to test with HoloLens 2.

    With the steps in Spatial Mapping in Unreal and the details in your post, I think you can try to move the ARSession and Spatial Mapping Capture setup part from the ARTrackableNotify's BP to the level BP.

    To verify that documentation, I just built a simple demo, you can check that here.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.