# Particle system not scaling based on parent objects - emitter is a mesh that is a child of a scaled parent

**URL:** <https://forum.babylonjs.com/t/particle-system-not-scaling-based-on-parent-objects-emitter-is-a-mesh-that-is-a-child-of-a-scaled-parent/13903>\
**Category:** Bugs\
**Tags:** particles\
**Created:** [September 4, 2020, 6:46am UTC](https://forum.babylonjs.com/t/particle-system-not-scaling-based-on-parent-objects-emitter-is-a-mesh-that-is-a-child-of-a-scaled-parent/13903 "2020-09-04T06:46:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Darren](https://forum.babylonjs.com/u/Darren)\
**Post date:** [September 4, 2020, 6:46am UTC](https://forum.babylonjs.com/t/particle-system-not-scaling-based-on-parent-objects-emitter-is-a-mesh-that-is-a-child-of-a-scaled-parent/13903/1 "2020-09-04T06:46:03Z")

</div>

Particles do not scale in relation to their parented meshes.

I have the following hierarchy: Sphere -\> Cube

`var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {diameter: 2, segments: 32}, scene);`  
`box = BABYLON.MeshBuilder.CreateBox("box", {size: 0.5}, scene)`  
`sphere.addChild(box);`

The particle system has it emitter set as the Cube.

`var particleSystem = new BABYLON.ParticleSystem("particles", 5000, scene);`  
`particleSystem.emitter = box;`

If I scale the sphere the size of the particles being emitted does not change (although the Cube does).

`sphere.scaling = new BABYLON.Vector3(0.1, 0.1, 0.1);`

I have created an example here: [https://playground.babylonjs.com/#1Z4SGN#1](https://playground.babylonjs.com/#1Z4SGN#1)

Any time the scale of the sphere is changed I had expected the size of the particles to change by the same factor (the same as the box does). However, they stay the same size.

In the playground example the cube moves left-right and then up/down as it reaches the extents defined. The scale of the sphere is changed when the cube reaches the top and also when it reaches the bottom.

Ideally, I need a system where all of the particles scale accordingly as I’m trying to use this in an AR project where the scale is continuously changing as the user moves their phone/tablet.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [September 4, 2020, 9:38am UTC](https://forum.babylonjs.com/t/particle-system-not-scaling-based-on-parent-objects-emitter-is-a-mesh-that-is-a-child-of-a-scaled-parent/13903/2 "2020-09-04T09:38:22Z")

</div>

It’s not a bug, it’s by design, the size of a new particle does not depend on the scaling of the parent hierarchy (when a mesh emitter is used).

Maybe we could add this option, but extracting the scaling from a matrix is not free (3 sqrt + a matrix determinant calculation).

I think you are better of updating the particle minSize and maxSize yourself when you update the scaling of the sphere:

[https://playground.babylonjs.com/#1Z4SGN#2](https://playground.babylonjs.com/#1Z4SGN#2)

---

<div class="post-metadata">

**Author:** ![Darren](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Darren](https://forum.babylonjs.com/u/Darren)\
**Post date:** [September 5, 2020, 1:08am UTC](https://forum.babylonjs.com/t/particle-system-not-scaling-based-on-parent-objects-emitter-is-a-mesh-that-is-a-child-of-a-scaled-parent/13903/3 "2020-09-05T01:08:03Z")

</div>

That’s a shame… I was wanting to use the particles to create a movement trace from an object. Since it’s an AR project the scale is continuously changing so I will need to come up with a different approach.

Thanks for the swift response 👍

---

<div class="post-metadata">

**Author:** ![ecojust](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ecojust/32/12884_2.png) [@ecojust](https://forum.babylonjs.com/u/ecojust)\
**Post date:** [May 7, 2022, 3:59pm UTC](https://forum.babylonjs.com/t/particle-system-not-scaling-based-on-parent-objects-emitter-is-a-mesh-that-is-a-child-of-a-scaled-parent/13903/4 "2022-05-07T15:59:51Z")

</div>

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

Sometimes, if there are many elements in the particle system, this method will not work.  
Maybe we need a new way to scale them as a whole
