You beat me to it. After stepping away for a few day I just started to dissect the commands and vector math.
I created a script similar to yours, no need to post it. The only difference was that i used closetPointOnMesh. I didn’t experience the abrupt changes in direction you did, and the behavior seemed better.
Glad you posted your solution!
Oh!! What i think helps with the with this script and the deforming surface is to create a geoCache of the surface.
What this line does is bascially give them a random rotation of 0 and 360 degrees in x y z. You could ofc if you just wanted it to be in one angle change it to 0,360,360 or something.
Then under rotation options choose particle_rotate.
Remember tho that the will randomly rotate every single frame now, if you just want to create some randomness and have your geometry be still, you can scrub in the timeline untill you find a frame youre happy with and then just put // in front of the expression or delete it.
He can add a custom attribute randomRotation and give and give it this expression :
particleshape1.randomRotation = rand(0,0.360,0)
and map it to the rotation, like that he will get random rotation on all the instances on the Y axis.
the bad thing about doing it with Index is that more indexes in the instances effect the ram during the rendering and slow down a bit the render if the objects instances get pretty big with complicated shader network complicated .