secondlife / secondlife/viewer
Particles on child prims are not interpolated properly
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 299
- Forks
- 146
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 88
Description
If a child prim in a linkset has a particle effect and the child prim moves individually, i.e. not via motion or TargetOmega of the root prim, the particles are not interpolated unlike the child prim's own motion.
Steps to reproduce: make a linkset with 2 cubes, make prim 2 50% transparent so you can see the particles inside it.
Insert the following script in the root:
default
{
state_entry()
{
integer MOVE_ROOT = FALSE; // set to TRUE to move the root, which has no interpolation issues
llLinkParticleSystem(2, [ // set up child prim particle system
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP,
PSYS_SRC_TEXTURE, "82e7dccf-5717-2601-05a2-0c6b86182b8e",
PSYS_PART_MAX_AGE, 3/30.0,
PSYS_SRC_BURST_RATE, 1/30.0,
PSYS_SRC_BURST_PART_COUNT, 1,
PSYS_PART_FLAGS,
PSYS_PART_FOLLOW_SRC_MASK | // can comment out the follow_src, the issue persists
PSYS_PART_EMISSIVE_MASK
]);
float t;
integer target = 2; // set up movement params
vector base = ZERO_VECTOR;
if(MOVE_ROOT) {
base = llGetPos();
target = LINK_ROOT;
llSetLinkPrimitiveParamsFast(2, [PRIM_POS_LOCAL, <0, 1, 0>]);
}
while(TRUE) {
llSetLinkPrimitiveParamsFast(target, [PRIM_POS_LOCAL, base+<0, llCos(t), llSin(t)>]);
t += 0.07;
if(t >= TWO_PI)
t -= TWO_PI;
llSleep(0.1);
}
}
}
You can see the particle blob will jitter and be ahead of the child prim's motion, not interpolated: it immediately snaps to the prim's true position instead of moving smoothly.
By setting the MOVE_ROOT to TRUE at the start of the script, it will move the root prim instead. The child prim particles are now interpolated correctly and follow the child prim's motion smoothly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is identified in the issue. Start by running the supplied LSL reproduction using llLinkParticleSystem and llSetLinkPrimitiveParamsFast, comparing child-prim movement with root movement. Done means particles attached to a moving child prim are interpolated smoothly rather than snapping ahead to its true position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100