Jump to content
  • 0
Sign in to follow this  
Annie Arellano

How to make Accel local for particle emitters?

Question

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.

Share this post


Link to post
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:

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...