# Solid Particle System updateParticle fails when attempting to pass a .props property into position

**URL:** <https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710>\
**Category:** Bugs\
**Tags:** particles\
**Created:** [April 8, 2023, 12:09am UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710 "2023-04-08T00:09:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forum.babylonjs.com/u/rascheln)\
**Post date:** [April 8, 2023, 12:09am UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/1 "2023-04-08T00:09:13Z")

</div>

Relevant PG: [https://playground.babylonjs.com/#XN1BZY#3](https://playground.babylonjs.com/#XN1BZY#3)  
If you comment line 46, uncomment line 47, the particles update as expected.  
However, lines 45 and 46 do not seem to work. Nothing seems to appear when I pass `.props.theta` in any form I’ve tried. No errors in the console that I can see.

I’m following the example here: [https://playground.babylonjs.com/#GLZ1PX#7](https://playground.babylonjs.com/#GLZ1PX#7)  
Additionally, does the updateParticle function only use properties inside the individual particles? Ideally, I’d just pass some global time parameter into this update function.

_EDIT_ aaaand of course I just solved it right after I posted this.

I just needed to remove the “new” keyword on line 34 :|. However, I still have the same question about property use for the updateParticle function.

---

<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:** [April 11, 2023, 12:26pm UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/2 "2023-04-11T12:26:50Z")

</div>

UpdateParticle is indeed only passed an individual particle at a time, but you can use global variables on it: [Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#XN1BZY#12)

---

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forum.babylonjs.com/u/rascheln)\
**Post date:** [April 12, 2023, 9:41pm UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/3 "2023-04-12T21:41:08Z")

</div>

Thanks for that guidance! This is good to know. This makes SPS a fairly powerful solution, assuming that the camera can keep the mesh’s origin in view 👍

---

<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:** [April 13, 2023, 11:03am UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/4 "2023-04-13T11:03:07Z")

</div>

You can set the SPS mesh to `alwaysSelectActiveMesh = true` so that it doesn’t clip out when the origin is not on view of the camera 😃 [Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#XN1BZY#13)

---

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forum.babylonjs.com/u/rascheln)\
**Post date:** [April 13, 2023, 5:58pm UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/5 "2023-04-13T17:58:16Z")

</div>

Oh excellent! Thanks for this.

A follow-up question: Any idea why the orbs darken when the camera points up towards them?

Does it have to do with directional light + billboard mode and the fact that the particle quads are pointing “down” at the camera? I’m guessing that it has to be an emissive texture to counteract for that. Though it seems that any emissive texture “level” I try still allows for dimming to occur 🤔

---

<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:** [April 14, 2023, 10:25am UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/6 "2023-04-14T10:25:03Z")

</div>

I don’t think particles are affected by lights, is that correct @sebavan ?

---

<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:** [April 14, 2023, 11:15am UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/7 "2023-04-14T11:15:37Z")

</div>

Yup totally correct, you would need SPS in case you want them to be lit.

---

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forum.babylonjs.com/u/rascheln)\
**Post date:** [April 14, 2023, 4:49pm UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/8 "2023-04-14T16:49:22Z")

</div>

That’s the thing. This is an SPS 😃

---

<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:** [April 14, 2023, 5:45pm UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/9 "2023-04-14T17:45:23Z")

</div>

Awwww sorry I didn’t read that part in the code 🤣 Oh yeah if it’s an SPS it’s going to be affected by lights by default buuut you can also set disableLighting on the material: [Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#XN1BZY#14)

---

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forum.babylonjs.com/u/rascheln)\
**Post date:** [April 14, 2023, 5:48pm UTC](https://forum.babylonjs.com/t/solid-particle-system-updateparticle-fails-when-attempting-to-pass-a-props-property-into-position/39710/10 "2023-04-14T17:48:45Z")

</div>

Ohh, I didn’t know about that option! Thanks 😃 That’ll be quite useful for some other effects I’m looking to do.
