# Spatial Mapping not considering MRTK 'Is Stationary Observer'

**URL:** https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934
**Category:** Unity Development
**Tags:** unity
**Created:** [September 26, 2022, 1:41pm UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934 "2022-09-26T13:41:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![daniel](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@daniel](https://forum.magicleap.cloud/u/daniel)
#### Post date: [September 26, 2022, 1:41pm UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934/1 "2022-09-26T13:41:32Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/143905f75da46d36593402810956b8c376688ca3.png)

..Even though 'Is Stationary Observer' is turned off, the mapping is still constrained to the devices initial start position, and does not update outside these initial bounds.

**Unity Editor version** : 2022.2.0b7  
**ML2 OS version** : Build: B3E.220818.12-R.085  
**MLSDK version** : 53.5  
**Host OS** : (Windows/MacOS) Windows 11

**Error messages from logs** (syntax-highlighting is supported via Markdown):

---

<div class="post-metadata">

### Author: ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)
#### Post date: [September 26, 2022, 5:33pm UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934/2 "2022-09-26T17:33:35Z")

</div>

Hi Daniel,

Pleases use the settings on the bottom of the Spatial Mesh profile:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/e21ad151171e5ee7d33d55ba888d1e771d297464.png)

---

<div class="post-metadata">

### Author: ![daniel](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@daniel](https://forum.magicleap.cloud/u/daniel)
#### Post date: [September 26, 2022, 6:42pm UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934/3 "2022-09-26T18:42:36Z")

</div>

Hi, yes this is set as per the settings that you provided, and I extended the bounds there:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/461825f0de2ebc8513c98210088e76f9d85079da.png)

The mesh remain fixed and doesn't scan outside of small bounded area, around 2x2x2. I also see that the render mode does not change to Point Cloud when I set that.

This is the same as per the example build that you sent last week, the spatial observer does not move with the device outside the bounds.

---

<div class="post-metadata">

### Author: ![daniel](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@daniel](https://forum.magicleap.cloud/u/daniel)
#### Post date: [September 28, 2022, 8:53am UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934/4 "2022-09-28T08:53:20Z")

</div>

This is now solved. We were previously having problems the scaling of the mesh, as the BoundedExtentsSize is being passed using the transform.localScale, which was previously commented out. This resulting in the extents size not being set.

---

<div class="post-metadata">

### Author: ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)
#### Post date: [June 20, 2023, 3:00pm UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934/5 "2023-06-20T15:00:41Z")

</div>

Hi there - We have similar issue, however the bounds update works fine in the first scene, but in the subsequent scene it doesn't update outside the origin. I've added primitives in order to debug, and the "meshingSubsystemParent" is in fact moving around with the camera, while the "meshParent" stays still (as it's supposed to).  
So it seems like something else in the subsystem is misbehaving.

---

<div class="post-metadata">

### Author: ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)
#### Post date: [June 20, 2023, 3:22pm UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934/6 "2023-06-20T15:22:40Z")

</div>

Can confirm the transform being passed during "UpdateBounds" in MeshingSubsystemComponent.cs is correctly being updated by the main camera, however, it still doesn't update outside the origin bounds in the subsequent scene.

---

<div class="post-metadata">

### Author: ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)
#### Post date: [June 20, 2023, 3:36pm UTC](https://forum.magicleap.cloud/t/spatial-mapping-not-considering-mrtk-is-stationary-observer/934/7 "2023-06-20T15:36:25Z")

</div>

Update: Using "Is Bounded" doesn't help.

Update 2:

From further testing, the order of scene launching or whether the system was active in the first or second scene doesn't matter.

I found that our use of ARFoundation's "MakeContentAppearAt" - which moves the playarea including the camera in order to move our root origin for multiplayer - somehow breaks the meshing. The meshing subsystem component's position does in fact move with the camera, however it doesn't update outside the original pose's bounds.

Update 3:  
It seems like moving the meshParent transform so it's not at 0.0.0 (when we move MixedRealityPlayspace.Transform) is what breaks it. Doesnt' matter whether we parent the meshParent transform or just set's the pos and rot, it just breaks meshing outside the original bounds.

Update 4:  
What's the difference between the two API's;  
com.magicleap.unitysdk

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/a5284bd98e768432a7f619a1af8ceb535cf9bc9c.png)  
vs  
com.unity.xr.magicleap  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/2e24bd183b3c4e35323407b48566c3664c5ce28a.png)

They both seem to have the same API but call different dll's.
