Animating Particle Emitter?
Hi! Apologies if this is a basic question, I am quite new to Lens Studio.
I am wondering if there is a way to animate a trail of particles along a path, or to slowly rotate the emitter along a path to give the illusion of a moving trail of particles. Basically, I'm trying to have a helix of particles slowly rotate around an object in space (using Landmarker). Can anyone give me any pointers?
Hey, this is totally doable but maybe a little trickier than you might think. Probably the simplest way to approach this is to use Tweens on a parent object to rotate and move the emitter through your scene. There are good resources on the Forum already about how to get started with the Tween Manager, so I'll skip the lengthy explanation for that.
Here's a diagram of how I would set this up:
You have your axis that you want your emitter to move along and rotate about (e.g. the up/down y-axis). We could just place our emitter directly into our scene and try to animate it along that axis, but rotating would just rotate the emitter about its own local axes, so it would just spin in place rather than orbit around the axis. To give it an orbit radius, we add the empty Scene Object first. It essentially acts as a container for our emitter, so we can add an offset to its rotation. So add the Scene Object and then add your emitter as a child of that SO. Give the emitter an offset (e.g. 6 units in the +x direction). Add your Tween Manager and add two Tween Transform Script Components to your Scene Object. One will be our rotation, which will just loop the orbiting emitter around from 0 -> 360deg, and the other will be our translation along the axis, which turns our "2D" orbit into a 3D helix.
Let me know if that makes sense and if you have any questions about the actual process of implementing it.