Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Particle bug? Feature? Or just me?

Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
05-21-2007 08:27
I've got a particle problem that's making me bonkers. I'm working on a vehicle and I've got a particle emitter in a smokestack to look like steam puffing out. The problem is, when the vehicle is in motion, the particles appear ahead of the emitter! If I'm going forwards, particles appear infront of the emitter. When I go backwards, particles appear behind the emitter. When I go sideways, they appear to the side and when I go up, the particles appear above, when I go down the particles appear below.

Now here's the frustrating thing: When I recompile the script, it works perfectly - particles appear at the point of the emitter. When I rez the vehicle out of inventory or when I rez it out of an object's inventory, the particles no longer work correctly, they work as described above.

Here's the script in question:
CODE

list params;

init() {
params = [PSYS_PART_FLAGS];
params += [PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_INTERP_COLOR_MASK];
params += [PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP];
params += [PSYS_SRC_ACCEL,<0.0,0.0,2.0>];
params += [PSYS_PART_START_COLOR, <0.75,0.75,0.75>];
params += [PSYS_PART_END_COLOR, <1.0,1.0,1.0>];
params += [PSYS_PART_START_SCALE, <0.125,0.125,0.0>];
params += [PSYS_PART_END_SCALE, <1.5,1.5,0.0>];
params += [PSYS_PART_START_ALPHA, 0.75];
params += [PSYS_PART_END_ALPHA, 0.0];
params += [PSYS_PART_MAX_AGE, 2.0];
params += [PSYS_SRC_BURST_PART_COUNT, 5];
params += [PSYS_SRC_BURST_RATE, 0.1];
llParticleSystem ( [ ] );
}

default {
on_rez(integer num) {
llResetScript();
}

state_entry() {
init();
}

link_message(integer linkNum, integer num, string message, key id) {
if(linkNum == LINK_ROOT) {
if(message == "motor") {
if(num == 1) llParticleSystem(params);
if(num == 0) llParticleSystem( [ ] );
}
}
}
}


I've tried resetting the script on-rez, I've tried not resetting the script on rez, it doesn't make any difference. When the script is recompiled it works properly, when the object is taken into inventory then rezed, it's wrong. I don't know if this is a rendering problem in the client or if it's something in LSL that's not right? The vehicle uses physics and the usual vehicle functions, it's about 26 prims all together, and every other aspect of it works correctly.

Any suggestions, input, comments, etc. would be most appreciated!

-Atashi
_____________________
Visit Atashi's Art and Oddities Store and the Waikiti Motor Works at beautiful Waikiti.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-21-2007 13:01
Well, unless it is some kind of client particle rendering bug that has cropped up, the only other thing I can think of is that the emitter prim is moving in the direction of travel in your build.

That script by itself works perfectly for me, though. The particles drop where the emitter prim is flawlessly, no matter how I move it.