# Mirroring mesh without negative scaling

**URL:** <https://forum.babylonjs.com/t/mirroring-mesh-without-negative-scaling/39815>\
**Category:** Questions\
**Created:** [April 12, 2023, 6:28am UTC](https://forum.babylonjs.com/t/mirroring-mesh-without-negative-scaling/39815 "2023-04-12T06:28:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheHOF](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/thehof/32/19750_2.png) [@TheHOF](https://forum.babylonjs.com/u/TheHOF)\
**Post date:** [April 12, 2023, 6:28am UTC](https://forum.babylonjs.com/t/mirroring-mesh-without-negative-scaling/39815/1 "2023-04-12T06:28:44Z")

</div>

Hi,

I’m currently facing the (probably known) problem, that augmented reality doesn’t work very smoothly on apple devices.  
I use the gltf exporter to create a glb from the babylon scene, which will then be uploaded into the model viewer and forwarded to the quick look app.  
The quick look app can’t work with NEGATIVE scalings in the glb =\> this leads to backface culling issues.

Anyway now I’m trying to get rid of negative scalings in my babylon scene, but this is really difficult, as the GLTF loader always introduces a “ **root** ” node with -1 scaling in z for the coordinate system conversion.  
Using babylon as right handed system is not really an option, as the viewer should work with glb and babylon files alike, also it would break existing projects.

So my main question is if there is anything like a “mirror mesh geometry” functionality that achieves the same result, as if the scaling is inverted?

I have a PG example with two crates, whereas one of them should be mirrored, that should break down the problem to a very small scope.

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

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [April 12, 2023, 8:34am UTC](https://forum.babylonjs.com/t/mirroring-mesh-without-negative-scaling/39815/2 "2023-04-12T08:34:45Z")

</div>

I don’t know about AR on iOS, never tried it. But did you try it with instances and then instanciate the hierarchy?

---

<div class="post-metadata">

**Author:** ![TheHOF](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/thehof/32/19750_2.png) [@TheHOF](https://forum.babylonjs.com/u/TheHOF)\
**Post date:** [April 12, 2023, 12:07pm UTC](https://forum.babylonjs.com/t/mirroring-mesh-without-negative-scaling/39815/3 "2023-04-12T12:07:30Z")

</div>

Hi @mawa,

Thx for the response, I was already able to solve the issue with the [Transformation Baking](https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/bakingTransforms) functionality.  
This “adds” the negative scaling of the root node in the geometry.  
Afterwards I can remove the negative scaling of the root node and AR works again.

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [April 12, 2023, 12:12pm UTC](https://forum.babylonjs.com/t/mirroring-mesh-without-negative-scaling/39815/4 "2023-04-12T12:12:02Z")

</div>

Glad to hear that. Funny fix. Might be of help to someone else with a similar issue so thanks for sharing 😃 and have a great day 🕶
