Jump to content
  • 0

How to make Accel local for particle emitters?


Annie Arellano
 Share

You are about to reply to a thread that has been inactive for 4820 days.

Please take a moment to consider if this thread is worth bumping.

Question

I'm working on a mouth attached particle emitter and I cannot get Accel to be local and not global so that the particles always come out the mouth and not through the back of the head ect.

Thanks to anyone who can offer some help!

 

**Extra note** Rotating the prim does nothing to change the flow of the particles. I am using the Accel feature so the particles are blown outwards and it uses the global positioning of the sim and not of the rotation of the prim. My script does not have any code in it that would tell the particles to follow the rotation of the prim, this is the problem I am having. I had found a code but even after implementing it, it did nothing, possibly due to not implementing it correctly.

Sorry for any confusion

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

That would be the problem. Prim rotation needs to be able to determine where the particles go, however by default Accel makes particles travel in the direction based on the sim coordinates and not the prim's. It won't aways go through the back of the head hence the ect. What I probably need is an extra bit of code to force the script to check the rotation of the prim and go by the prim's rotation. I had found one bit but I cannot get it to work.

Link to comment
Share on other sites

  • 0

Particles are always emitted from the +Z end of the prim in which the script sits, so all you need to do is select that prim in Edit (You will probably need to highlight transparent objects -->> Ctrl - Alt - T ) and then be sure that you are viewing axes in Local reference frame rather than Global.  Then rotate the prim so that the pointy end of the Z (blue) axis is aimed out of your mouth.  It's probably smart to do this while you are on a pose stand.  :smileywink:

Link to comment
Share on other sites

  • 0

Acceleration is a vector, so even when the z-axis is set so that the particles come out in the right direction they then accelerate away in the single, fixed <x, y, z> direction it's given.

What you need to do is periodically stop and restart the particle-system, rotating your acceleration vector to match the avatar's. Now :-) Ha!  Rotations in LSL are less than clear.  For a full explanation see this page: http://wiki.secondlife.com/wiki/Rotation

However, if you are put off by that - and who isn't? - try replacing your vector with this: "(<vector as now> * llGetRot())" - multiplying the vector direction by the rotation of the avatar (if I've got it right).

Please ask in the scripting forum if you have any more trouble with this.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4820 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...