secondlife / jira-archive

3 stars 0 forks source link

[BUG-11643] Child prim not touchable after being resized and moved relative to root prim by script. #1791

Open sl-service-account opened 8 years ago

sl-service-account commented 8 years ago

Steps to Reproduce

Testing a HUD I am making.

Actual Behavior

After a script changes the size of a linkset and then moves a child prim, the child prim can no longer be touched or selected unless moved back to its prior position. Occurs more frequently when worn as a HUD than when rezzed on the ground. The touch problem can be cleared by any of the following: (a) Detach and reattach if worn as a HUD, or take into inventory and re-rez if not worn as a hud; (b) right-click the linkset, select Edit, then close the Edit window; (c) open and close the viewer's inventory window.

Expected Behavior

The child prim should be touchable after the linkset is resized and the child prim is moved.

Other information

I can provide a test linkset and test script to repro the issue.

Viewers affected: This problem has been seen in several viewers (Official SL, Firestorm, and Singularity), however it occurs more consistently in Firestorm and more randomly in the other two. It also occurs more consistently when worn as a HUD. When rezzed on the ground, it seems to be a function of cam distance (more often when camming in close).

Attachments

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-11643 | | Summary | Child prim not touchable after being resized and moved relative to root prim by script. | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | Fred Allandale (fred.allandale) | | Created at | 2016-03-25T23:14:28Z | | Updated at | 2017-03-16T17:56:02Z | ``` { 'Business Unit': ['Platform'], 'Date of First Response': '2016-03-25T19:37:43.195-0500', "Is there anything you'd like to add?": 'I can provide a test linkset and test script to repro the issue. \r\n\r\nViewers affected: This problem has been seen in several viewers (Official SL, Firestorm, and Singularity), however it occurs more consistently in Firestorm and more randomly in the other two. It also occurs more consistently when worn as a HUD. When rezzed on the ground, it seems to be a function of cam distance (more often when camming in close).\r\n\r\n', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'SL Viewer', 'Target Viewer Version': 'viewer-development', 'What just happened?': "After a script changes the size of a linkset and then moves a child prim, the child prim can no longer be touched or selected unless moved back to its prior position. Occurs more frequently when worn as a HUD than when rezzed on the ground. The touch problem can be cleared by any of the following: (a) Detach and reattach if worn as a HUD, or take into inventory and re-rez if not worn as a hud; (b) right-click the linkset, select Edit, then close the Edit window; (c) open and close the viewer's inventory window.", 'What were you doing when it happened?': 'Testing a HUD I am making.', 'What were you expecting to happen instead?': 'The child prim should be touchable after the linkset is resized and the child prim is moved.', 'Where': 'Occurs in all regions.', } ```
sl-service-account commented 8 years ago

Fred Allandale commented at 2016-03-25T23:21:16Z

Repro (using test script below):

  1. Make a simple two prim linkset consisting of a cube (root) and sphere (child).

  2. Install the test script (below) in the root prim.

  3. Wear as a HUD (problem more repeatable as HUD, but also occurs randomly when rezzed on the ground).

  4. Touch the root prim (cube) and verify the sphere alternately moves to the right and left of the cube.

  5. Touch the child prim (sphere) and verify the same thing.

  6. Type /5 big or /5 small in chat to change the linkset size.

  7. Touch the child prim (sphere) and verify it moves to the opposite side of the cube.

  8. Touch the child prim (sphere) again and notice now it is not touchable and the linkset cannot be selected by right-clicking on the sphere.

  9. Touch the root prim (cube) and notice the sphere moves back to original position.

10 Touch the child prim (sphere) and notice it moves to the opposite side of the cube.

  1. Touch the child prim (sphere) again and notice it still is not touchable.

  2. To clear the problem, do one of the following: (a) Detach and reattach if worn as a HUD, or take into inventory and re-rez if not worn as a HUD; (b) right-click the linkset, select Edit, then close the Edit window; (c) open and close the viewer's inventory window. Method (c) is particularly surprising.

Expected behavior:

  1. Child prim (sphere) should be touchable and selectable.

  2. Child prim (sphere) should be touchable and selectable.

NOTE: The test script uses llScaleByFactor(float factor) to change sizes. However the same problem was observed using other methods, e.g. llSetLinkPrimitiveParamsFast to set PRIM_SIZE and PRIM_POS_LOCAL.

Test script:

float BIG = 0.5; float SMALL = 0.25; float Offset = 1.0; vector RootScale;

SetSize(float size) { RootScale = llGetScale(); float scalefactor = size / RootScale.z; if(!llScaleByFactor(scalefactor)) llOwnerSay("ERROR: Unable to set size to " + (string)size); }

default { state_entry() { llOwnerSay("Type /5 big or /5 small in chat to change size."); llOwnerSay("Touch root or child prim to change child's position."); llListen(5,"",llGetOwner(),""); RootScale = llGetScale(); llSetLinkPrimitiveParamsFast(2,[PRIM_POS_LOCAL,<0,Offset*RootScale.y,0>]); }

on_rez(integer start_param)
{
    llResetScript();
}

touch_start(integer total_number)
{
    Offset = -Offset;
    llOwnerSay("Link " + (string)llDetectedLinkNumber(0) + " touched.");
    RootScale = llGetScale();
    llSetLinkPrimitiveParamsFast(2,[PRIM_POS_LOCAL,<0,Offset\*RootScale.y,0>]);
}

listen(integer chan, string name, key id, string cmd)
{
    if(llToUpper(cmd) == "BIG") SetSize(BIG);
    else if(llToUpper(cmd) == "SMALL") SetSize(SMALL);
}

}

sl-service-account commented 8 years ago

Whirly Fizzle commented at 2016-03-26T00:37:43Z

Reproduced on Second Life 4.0.2 (312269) Mar 9 2016 16:36:13 (Second Life Release)