secondlife / jira-archive

3 stars 0 forks source link

[BUG-40630] llSetStatus() Rotation Problems from SVC-1247 seem to still be an issue. #12276

Closed sl-service-account closed 9 months ago

sl-service-account commented 8 years ago

Steps to Reproduce

Testing scripted objects using llLookAt() or llRotLookAt() that I recently coded. I attempted to lock rotations using llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE); which should have locked rotations to occur only on the Z axis of the object.

Actual Behavior

Scripted objects using llLookAt() or llRotLookAt() are (at least in some cases) not respecting rotational locks set via llSetStatus() no matter what axis should have rotation locked. They act as though the status was not set.

Expected Behavior

According to the wiki article for llSetStatus() at http://wiki.secondlife.com/wiki/LlSetStatus : Constants Value Default Description STATUS_ROTATE_X 0x002 TRUE Can turn along this axis STATUS_ROTATE_Y 0x004 TRUE Can turn along this axis STATUS_ROTATE_Z 0x008 TRUE Can turn along this axis

This should mean that if the default status is changed using llSetStatus() these rotations should not be able to be done.

Other information

Not sure if the documentation for this scripting call is out of date, or just lacking, or if this is really not how it is intended to behave. I have no issues sending a Linden a copy of the code to test.

Given that this is apparently expected behavior according to Dan Linden I must conclude that the wiki documentation for llSetStatus() and the STATUSROTATE* flags is lacking required information. I have altered the effected systems to reflect this information and I am submitting images with the proposed changes to the wiki pages made and outlined in red (this is the information currently missing from the pages depicted). Hopefully these alterations can be implemented to improve the documentation.

Attachments

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-40630 | | Summary | llSetStatus() Rotation Problems from SVC-1247 seem to still be an issue. | | Type | Bug | | Priority | Unset | | Status | Closed | | Resolution | Expected Behavior | | Reporter | Certified Lunasea (certified.lunasea) | | Created at | 2016-10-03T00:48:18Z | | Updated at | 2016-10-11T17:36:57Z | ``` { 'Business Unit': ['Platform'], 'Date of First Response': '2016-10-03T12:08:46.566-0500', "Is there anything you'd like to add?": 'Not sure if the documentation for this scripting call is out of date, or just lacking, or if this is really not how it is intended to behave. I have no issues sending a Linden a copy of the code to test.', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'Website', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'Scripted objects using llLookAt() or llRotLookAt() are (at least in some cases) not respecting rotational locks set via llSetStatus() no matter what axis should have rotation locked. They act as though the status was not set.', 'What were you doing when it happened?': 'Testing scripted objects using llLookAt() or llRotLookAt() that I recently coded. I attempted to lock rotations using llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE); which should have locked rotations to occur only on the Z axis of the object.', 'What were you expecting to happen instead?': 'According to the wiki article for llSetStatus() at http://wiki.secondlife.com/wiki/LlSetStatus :\r\nConstants \tValue \tDefault \tDescription\r\nSTATUS_ROTATE_X \t0x002 \tTRUE \tCan turn along this axis\r\nSTATUS_ROTATE_Y \t0x004 \tTRUE \tCan turn along this axis\r\nSTATUS_ROTATE_Z \t0x008 \tTRUE \tCan turn along this axis\r\n\r\nThis should mean that if the default status is changed using llSetStatus() these rotations should not be able to be done.', 'Where': 'http://maps.secondlife.com/secondlife/Hickory%20Hills/85/59/19', } ```
sl-service-account commented 8 years ago

Dan Linden commented at 2016-10-03T17:08:47Z

Could you provide a sample script that demonstrates the reported bug?

sl-service-account commented 8 years ago

Certified Lunasea commented at 2016-10-04T06:11:26Z

Dan Linden: As this is for a product I intend to sell within Second Life I do not feel comfortable sharing this code directly on the Jira, but I have sent an example script directly to you in-world at 11:08 PM PDT that should display the current status of STATUSROTATE* flags as well as rotation information for each axis at various points within the script.

sl-service-account commented 8 years ago

Certified Lunasea commented at 2016-10-04T07:01:31Z

Script demonstrating behavior sent directly to Dan Linden.

sl-service-account commented 8 years ago

Certified Lunasea commented at 2016-10-10T15:56:10Z

Still waiting to see if Dan Linden received the script I sent him and if he was able to reproduce or observe the issue using it.

sl-service-account commented 8 years ago

Dan Linden commented at 2016-10-10T21:00:48Z

Thank you for the example script.

I believe the expected behavior for STATUSROTATE* flags is that they only apply for physical objects. Following are a couple scripts that ignore STATUSROTATE* flags when the object is non physical and obey the flags when physical.

// demonstration of llRotLookAt ignoring STATUS_ROTATE for a non-physical object.
rotation rot_xyzs;
default
{
    state_entry()
    {
        vector xyz_angles = <15.0, 15.0, 0.0>; // This defines a change on the axes
        vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to radians
        rot_xyzs = llEuler2Rot(angles_in_radians); // Convert to a rotation
        llSetHoverHeight(5,1,1);
        llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y , FALSE);
        llSetStatus(STATUS_ROTATE_Z, TRUE);
        llSetTimerEvent(1);
    }
     timer()
    {
        llRotLookAt(llGetLocalRot()*rot_xyzs, 1.0, 1.0); // Apply the increment rotation to the prim's current rotation ...
    }
}
// demonstration of llLookAt ignoring STATUS_ROTATE for a non-physical object.
float counter = 0;
default
{
    state_entry()
    {
        llSetHoverHeight(5,1,1);
        llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y , FALSE);
        llSetStatus(STATUS_ROTATE_Z, TRUE);
        llSetTimerEvent(0.1);
    }
     timer()
    {
        counter = counter + .1;
        llLookAt( llDetectedPos(0) + (50 *<llSin(counter), llSin(counter), llSin(counter)>), 1.0, 0.2 );
    }
}

I will review this with a developer soon.

sl-service-account commented 8 years ago

Dan Linden commented at 2016-10-11T06:09:03Z

This is the expected behavior.

sl-service-account commented 8 years ago

Dan Linden commented at 2016-10-11T17:36:57Z

Thank you for the documentation change suggestions! I have passed them along to our documentation team.