Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Bug? Right clicking mouse triggers arrow key control events

Phate Shepherd
Addicted to code
Join date: 14 Feb 2008
Posts: 96
05-03-2009 12:08
Before I post this to the jira, is this intended behavior or a bug?

If your script takes keyboard control, I have noticed that rot_right and rot_left keyboard events are firing at random when you right click objects around you... but ONLY if your camera is zoomed out from your avatar. Here is sample code to trigger it, just drop it in a prim cube and sit on the cube.

default
{
state_entry()
{
llSitTarget(<0.25,0,.6>, ZERO_ROTATION);
llSetText("Sit to test a bug",<1,1,1>,1);
}

changed(integer change)
{
key av = llAvatarOnSitTarget();
if (change & CHANGED_LINK && av != NULL_KEY) llRequestPermissions(av, PERMISSION_TAKE_CONTROLS);
}

run_time_permissions(integer perm)
{
if (perm & PERMISSION_TAKE_CONTROLS)
{
llTakeControls(CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT, TRUE, FALSE);
llSay(0,"Now, focus your camera on something else and zoom back, then right click on objects around you. Keyboard Control events fire at random as objects are right-clicked on.";);
}
}

control(key id, integer level, integer edge)
{
integer just_pressed = level & edge;

if (just_pressed & CONTROL_ROT_RIGHT) llSay(0,"Did you right click, or did you press right arrow?";);

else if (just_pressed & CONTROL_ROT_LEFT) llSay(0,"Did you right click, or did you press left arrow?";);
}
}
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-03-2009 14:03
by the wiki nothing should be returned for a right click, and left click should have entirely separate bit field.... have it print the bitfield when you do this to see if it's the test or or the betifield that's being returned incorrectly... but no that shouldn't be happening AFAICT
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Phate Shepherd
Addicted to code
Join date: 14 Feb 2008
Posts: 96
05-03-2009 14:39
Yep, I printed the bitfield, and it is giving the exact same results as the keypress.

I can see how that slipped by.... but I can't figure out how or why that got in there in the first place!
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-03-2009 20:50
freaky... I wonder if it's a recent addition, I don't remember it being an issue before... but then I didn't heavily use controls
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
05-04-2009 01:27
they have been playing with right-click and pie menus in the RC..dunno if this would have anything to do with it or not
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
05-04-2009 01:36
I was wondering if the new picker from 1.22 could have had something to do with it, but even 1.20.17 triggers this.
Phate Shepherd
Addicted to code
Join date: 14 Feb 2008
Posts: 96
05-04-2009 07:40
From: Viktoria Dovgal
I was wondering if the new picker from 1.22 could have had something to do with it, but even 1.20.17 triggers this.



Thanks for adding that to the jira Viktoria.
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
05-04-2009 16:45
I don't see the cries about it, an avatar rotating around should fire off the subsequent obvious control bits as needed.

If you right-click on an object in third person in alt-cam, not follow cam or mouselook, your avatar will rotate to face the selected prims centre. This only happens with the Pie Menu and being in free-cam.
_____________________

Geometric Library, for all your 3D maths needs.
https://wiki.secondlife.com/wiki/Geometric

Creator of the Vertical Life Client
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
05-04-2009 18:11
What I was seeing were controls firing mostly in one direction and occasionally in the other, with no relation to the position of the prim relative to the camera or the avatar. If it actually followed right or left it might be useful.
Phate Shepherd
Addicted to code
Join date: 14 Feb 2008
Posts: 96
05-04-2009 19:51
Yes, if it followed left and right per the location of your clicks, and only in mouseview, it might make some kind of sense. But, NOT for pie menu. That is just.... wrong.