Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Particles, scales, and rotations

Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
05-03-2006 13:18
I am trying to produce particles that begin as the shape of the object they are in (read by the script). I use llGetScale to get the inital scale of the particles. But in the case of a sphere, it begins life rotated. So, unless I manually rotate the sphere, the particles come out the right "shape", but rotated. How can I rotate the intial shape of the particles?

In other words, if I start out with a perfect sphere, the particles begin as perfect spheres. But if I stretch the sphere "up", the particle shapes get stretched to one "side".

Thanks,
Baron
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
05-03-2006 13:32
Bear in mind that spheres start out life rotated 90 degrees onto their side, for some odd reason I've never quite fathomed. So if a fresh-rezzed particle is stretched 'upwards', you're not actually stretching the sphere along its z-axis, but rather along its x-axis (in fact, -x is 'up' on a newly-rezzed sphere). That might have something to do with the problem you're seeing.
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-03-2006 13:40
Well, firstly, the particles really are only 2D representations of the shape, and they begin life always oriented orthogonally, just as the texture appears to you if you view it (ie, "up" is up, and "right" is right). Particles cannot be rotated, unless the texture itself is rotated (ie, in an editor and re-uploaded), or by using the PSYS_PART_FOLLOW_VELOCITY_MASK flag, which orients them with their "up" in the direction of their movement. If they are just expanding in place, and not meant to move away from the objects, you can set a very small PSYS_PART_BURST_SPEED_MAX (and/or MIN), like 0.01, and they will orient in the direction the emitter is pointing in the properly-set ANGLE, CONE, or LINEAR patterns.

Hope that helps. :)