So I needed to constrain a locator to a moving particle so that I can bake the translation of the particle into it and get some animation curves. So far, I found this information in a previous thread:
—— start of previous message
Frequenter Jul '12
This works with regular particles so not sure if it will work with nParticles or not.
// declare a float array variable and store the world position values of a particle in it
float $position : getParticleAttr worldPosition -at particleShape1.pt;
//assign the stored values to the Translate X Y Z attributes of the locator
locator1.tx = $position;
locator1.ty = $position;
locator1.tz = $position;
// I hope it helps
—— end of precious message
However, I tried it and it gives me a ton of syntax errors. Needed to know if anyone knows what I could be doing wrong.
I tied it with particleShape1.pt as well as with particle1.pt and particle1.pt. I also tried it with both nParticles and regular particles.
But I get syntax errors for every line almost. Any help would be appreciated to get this to work or another way to constrain the locator and make this work.
Thanks in advance,