Is there a way to track where the mouse pointer is without going into mouselook?
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
01-24-2010 11:35
Is there a way to track where the mouse pointer is without going into mouselook? Or, alternatively, can I put someone into mouselook (who isn't using RLV) automatically without asking them to sit on something?
I'm making a toy that, when touched, rezzes an object. The rezzer asks the the avatar who's touched it for PERMISSION_TRACK_CAMERA and then keeps on moving to where your mouse pointer is.
I've got it working pretty well, but I'd rather not, if I can avoid it, have to ask people to enter mouselook -- I'd rather do it automatically, if I have to do it at all, or find an alternative method if there is one. I don't want to use keyboard controls to move the object because the idea is the operator can move around too (which is why I can't use llForceMouselook()).
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
01-24-2010 11:52
I don't believe so. Unless you're in mouselook, I don't think SL knows anything about your mouse until you click one of its buttons. I suppose that means you could make your toy move from one point to another by using mouse clicks to establish new targets, but that's not as satisfying as the smooth movement you want. You'd also have to be very careful about how you set those targets, or your toy could find itself hundreds of meters away without warning.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-24-2010 12:46
llForceMouselook says only on sit, but I wonder if anyone has tried it in the root of an attachment...
not possible to track the mouse pointer in LSL outside of mouselook, I don't even think Emerald or others transmit or read THAT information (just focus and position)...
assuming you force them to focus on the object (alt+click) that information is available from the client. (unless blocked)
_____________________
| | . "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... | - 
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
01-24-2010 14:07
From: Void Singer llForceMouselook says only on sit, but I wonder if anyone has tried it in the root of an attachment. It seems they have; according to the wiki, From: someone If the function is used in an attachment (like a HUD), then the wearer is not forced into Mouselook mode. Rather, a button appears at the bottom of the screen, and the wearer must click it to enter Mouselook. This is similar to what happens when CONTROL_ML_LBUTTON is captured with llTakeControls. http://wiki.secondlife.com/wiki/LlForceMouselook Which isn't quite what I wanted but is good to know. I guess taking controls and thus popping up the mouselook button would make my toy a bit easier to use, though it does mean people will have to OK two dialogs. Hmm. /me really wants RLV to be made part of the official viewer.. there is so much fun you can have with it (not just the bdsm sort of fun, either). ETA.. it doesn't quite mean what i thought it did, it seems.. having the rezzed object take controls doesn't pop up a button, which i hoped it would. My current compromise is to tell the user to go into mouselook and then start a timer that checks llGetAgentInfo and doesn't turn physics on and start following the mouse pointer until the avatar is in mouselook, at which point the timer turns off.
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-24-2010 15:11
damn, I skimmed right over that because it wasn't in caveats or notes, maybe I'll relocate it later if I remember...
_____________________
| | . "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... | - 
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
01-24-2010 15:44
Emerald can be set to pass mousepointer information in a chat channel. I've seen someone using this to animate prim details around the eyes to make them more realistic.
|
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
|
01-24-2010 17:37
I have been looking for different ways of using mousepointer info for a long time (6 months - 1 year). http://www.youtube.com/watch?v=_zxU1khDXcUIf you have any kind of needs your looking for, what kind of tracking specifically?
_____________________
 Geometric Library, for all your 3D maths needs. https://wiki.secondlife.com/wiki/Geometric Creator of the Vertical Life Client
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
01-24-2010 19:00
Greenlife Utility Stream. Don't know what the format is.
|
Opensource Obscure
Hide UI
Join date: 5 Jun 2008
Posts: 115
|
01-25-2010 05:17
I thought that the Slate HUD by Babbage Linden used this technique
http://slateit.org/media/faq.html
Actually, I always wondered why it didn't get traction (low performances, I guess?)
Unfortunately I'm not good enough as a scripter to try it myself (well, I did try, and failed).
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
01-25-2010 08:52
From: Nexii Malthus I have been looking for different ways of using mousepointer info for a long time (6 months - 1 year). http://www.youtube.com/watch?v=_zxU1khDXcUIf you have any kind of needs your looking for, what kind of tracking specifically? Wow! That really looks like what I would like to do. Basically, I'm trying rez a small object that the user can move around, slowly and smoothly, by moving the mouse pointer. Tracking the camera position when the user is in mouselook and using llMoveToTarget works pretty well, but I'd like to avoid mouselook if I can. If you can give me any advice on how to achieve that using the regular viewer, I would be so grateful.
|
Kitty Barnett
Registered User
Join date: 10 May 2006
Posts: 5,586
|
01-27-2010 06:28
From: Innula Zenovka /me really wants RLV to be made part of the official viewer.. there is so much fun you can have with it (not just the bdsm sort of fun, either). Just for completeness sake: RLV can't be used to force someone into mouselook, or even keep them in mouselook once they're in it. Since a script is capable of monitoring whether someone is in mouselook or not the idea is that the viewer shouldn't be trying to do things scripts can accomplish. (I don't personally agree, but that's the reason)
|