Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Unexpected Behavior from Particle Effect

Jexx Rayner
Registered User
Join date: 30 Jun 2006
Posts: 16
03-05-2007 14:15
Hey again folks! I have a particle effect which emits from a touched wall and I have the llDetectedKey assigned as the particle system target ( and have the flag set to follow the defined target ). When touched the particles either go up and then circle back down to the target ( in the case of angle patterns ) or in the case of explode patterns they emit outward and then all head inwards towards the target. Is there a way to specify that the particles head straight to the target at the time they are emitted?

Thanks,
Jexx
Lash Stringfellow
Registered User
Join date: 17 Dec 2006
Posts: 3
03-05-2007 16:19
Try using PSYS_PART_TARGET_LINEAR_MASK

-Lash
Jexx Rayner
Registered User
Join date: 30 Jun 2006
Posts: 16
03-06-2007 07:54
I did not know about that flag, thanks for pointing it out... Not sure its what I want though, it seems to cancel out many of the other paramters in the particlesystem like the pattern ( seems to force a pattern of PSYS_SRC_PATTERN_DROP ) and it also points the particles at a point above my head, not really at my position... Does anyone know if the linear mask is supposed to function this way?

Thanks!
Jexx
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
03-06-2007 10:27
If you use an avatar key as the particle target, I'm guessing that the position vector returned is above the av's head, instead of the av mesh origin (the crotch area). Note that if you show the map position of someone in your friends list who is within your draw distance, the red arrow points to this relative position above their head as well.
Jexx Rayner
Registered User
Join date: 30 Jun 2006
Posts: 16
03-08-2007 08:38
Hmm, thats kind of a drawback. So what would be a good way to bypass that issue and create a particle effect that heads to the center of an avatar's position, if there is a way?

Thank you,
Jexx
JT Dagger
meeps
Join date: 2 Feb 2007
Posts: 23
03-14-2007 11:33
I'm taking a break from RL work to lurk on the boards. This one hasn't been answered, and not sure if you figured out a solution. I can't get in-world but maybe this will help...

So you have something like:

touch(){ vector pos = llDetectedPos(0); streamparticles(pos); }

You're using PSYS_PART_TARGET_LINEAR_MASK intending to stream particles at your target, and you're ending up with a stream of particles to a position above the intended avatar.

So llDetectedPos() is a little bit weird.

K, that much I gathered from the previous posts.


How about "llDetectedPos() - <0.0,0.0,1.0>" for a quick kludge?

or maybe:
vector size = llGetAgentSize(llDetectedKey(0));
streamparticles(pos - <0.0,0.0, size.z/2>;);

I'm very new to LSL so not sure if my syntax is correct and I'm unable to test this in-world.

Maybe the use of llGetAgentSize would have problems with mini avs or other avies that use AOs to visually obscure the actual size of the avie's bounding box.

If you need the stream to follow your target around, you'll probably need to tuck a llSensorRepeat() to keep track of the moving agent, inside your touch_start(), and update your particle stream target position in sensor().

Good luck :)
-JT