Detect mouse position in particles

Any way to detect the position of the mouse in this set of particles and that each particle moves on its z axis?

This is what I have

https://codepen.io/AlainBarrios/pen/PvazpL?editors=0010

1 Like

Looks like you are basing it on this project?

Do you want to do something different to the way the particles move there, or are you trying to set up the same movement?

Yes, but Iā€™m trying to see something different to see how the mouse works.

How could I do it to shader?