Unity Positional Tracking

Is it possible to add positional tracking to the Unity package?

// Enable positional tracking with default parameters
PositionalTrackingParameters trackingParams = new PositionalTrackingParameters();
zed.EnablePositionalTracking(ref trackingParams);

Can I add my own .dll references somewhere? I need to be able to save and load a ZED 2i area file in Unity.

Hi @RobotMachines

It’s a bit hidden due to a residual architecture choice, but it’s available as the EnableTracking() method.

It’s also available in the inspector of the ZED Manager, I think, the area file path and such.

1 Like

Thank you! I kind of new it but never got it to work. You gave me hope to keep trying and I got it to work just now with your encouraging words. In the ZED_Rig_Mono prefab, the process is to check the box to save the mesh when finished. As an example, use filename, “Assets/ZEDMesh.obj”. This will save a “Assets/ZEDMesh.obj” file and a “Assets/ZEDMesh.area” file. Then, when you load the next session, place the name, “Assets/ZEDMesh.area ← .area, in the “Path Spatial Memory” in the Inspector window field when loading the prefab. I have yet to see if the camera is using the file to know where it is, but this is a great step in that it loaded the file and gave an error when I used the wrong file. Seems to be working.

Thank you.

Now to see if I can tell if the camera reorients based on the loaded area file.

1 Like