# How to get the number of particles on when index in niagara using grid2D?

**URL:** <https://forums.unrealengine.com/t/how-to-get-the-number-of-particles-on-when-index-in-niagara-using-grid2d/1169892>\
**Category:** FX\
**Tags:** unreal-engine, question\
**Created:** [May 18, 2023, 2:10pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-of-particles-on-when-index-in-niagara-using-grid2d/1169892 "2023-05-18T14:10:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MISSMMP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MISSMMP](https://forums.unrealengine.com/u/MISSMMP)\
**Post date:** [May 18, 2023, 2:10pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-of-particles-on-when-index-in-niagara-using-grid2d/1169892/1 "2023-05-18T14:10:19Z")

</div>

Hi every one , I am a recent contact with niagara and I had already implemented the ‘physarum’ effect with niagara  
this : [[UE] [Niagara] Physarum - YouTube](https://www.youtube.com/watch?v=BkWEkgL_7cc)  
and would like to use niagara to implement a 2D gravity effect, like this [Realtime 2D Gravity Simulation - YouTube](https://www.youtube.com/watch?v=GjbcvqEOIuE&list=LL&index=5)  
I need to get the current number of particles on grid unity and use the obtained value as mass to calculate the gravitational force.
