# React-Native: Unexpected behaviour of Instance Mesh on its Parent movement

**URL:** <https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001>\
**Category:** Bugs\
**Tags:** instances, mesh, pointerevents, pointerdragbehavior\
**Created:** [December 30, 2022, 3:36pm UTC](https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001 "2022-12-30T15:36:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/suman/32/33970_2.png) [@Suman](https://forum.babylonjs.com/u/Suman)\
**Post date:** [December 30, 2022, 3:36pm UTC](https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001/1 "2022-12-30T15:36:35Z")

</div>

Hello,

I have found that the **Instance Mesh behaviour** is unexpected as like babylonjs in react-native, particularly when I move its parent towards Left, Right and Down Direction.  
You can see this in bellow screen recording.

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/6/c6d8733f0dc842a3ff79d0b62b24535c99c16970.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/6/c6d8733f0dc842a3ff79d0b62b24535c99c16970.mp4)

Also, I produce a playground example as bellow:

> **[Babylon.js Playground](https://playground.babylonjs.com/#LQAW9K)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Thanks

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [January 2, 2023, 3:31pm UTC](https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001/2 "2023-01-02T15:31:40Z")

</div>

cc [@BabylonNative](https://forum.babylonjs.com/groups/babylonnative)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [January 2, 2023, 4:51pm UTC](https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001/3 "2023-01-02T16:51:17Z")

</div>

It looks like it works as expected. You can see it really well if you do not attach the ground to the root mesh as well [https://playground.babylonjs.com/#LQAW9K#3](https://playground.babylonjs.com/#LQAW9K#3)

---

<div class="post-metadata">

**Author:** ![Suman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/suman/32/33970_2.png) [@Suman](https://forum.babylonjs.com/u/Suman)\
**Post date:** [January 3, 2023, 7:00am UTC](https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001/4 "2023-01-03T07:00:31Z")

</div>

Not only ground mesh also I can attach multiple mesh/obj to the **root-mesh** , So, as per the solution I need to reposition all of those on user interaction, this is not a good solution in my case.  
If I compared with the BabylonJS, there have no such types of limitation. But Thank you very much for addressing this issue.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [January 3, 2023, 8:18pm UTC](https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001/5 "2023-01-03T20:18:27Z")

</div>

cc @Cedric

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [January 4, 2023, 11:17am UTC](https://forum.babylonjs.com/t/react-native-unexpected-behaviour-of-instance-mesh-on-its-parent-movement/37001/6 "2023-01-04T11:17:28Z")

</div>

It’s a bug!

> <https://github.com/BabylonJS/BabylonNative/issues/1189>
>
> Following this forum thread: 
> https://forum.babylonjs.com/t/react-native-unexpe…cted-behaviour-of-instance-mesh-on-its-parent-movement/37001/2
> 
> After investigations, there is a difference in instancing rendering.
> On the JS side, \`instanceCount\` is used to set the number of instances to render
> https://github.com/BabylonJS/Babylon.js/blob/b2cb023438e190108ebc4d52a0cadfd18c71bb31/packages/dev/core/src/Engines/nativeEngine.ts#L586
> 
> On the native side, the instance count is determine by the size of the instance.
> A possible fix is to forward the \`instanceCount\` in the protocol (PR on bjs), then use that value to limit the number of instance sent to bgfx here : 
> https://github.com/BabylonJS/BabylonNative/blob/599008710819cc4ca6b828dc37b81f76485779f6/Plugins/NativeEngine/Source/VertexBuffer.cpp#L187
