finding the location of a touch?
|
|
Mechanique Thirty
Pretty Spider
Join date: 15 Mar 2005
Posts: 60
|
11-28-2006 16:13
I've been searching the forums to no avail: is there any way to find out where on a prim I clicked? I haven't even found people asking similar questions.
I'm working on a HUD for a color-changing avatar, and I'd like to have a color wheel as well as a handful of preset buttons. I figure I could put a circular rainbow texture on a disc, then do some math to change a click coordinate into a HSV value that roughly corresponds to the color under the click.
If not, well, I'll just have a larger selection of color presets...
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-28-2006 16:28
It takes some work but you can use llDetectedGrab()
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Mechanique Thirty
Pretty Spider
Join date: 15 Mar 2005
Posts: 60
|
11-28-2006 18:08
Hmm, I was getting the same results from llDetectedGrab() no matter where I clicked on my test prim, aside from some seemingly-random fluctuations in Z. Maybe I'll just stick with a handful of predefined colors after all...
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
11-29-2006 02:01
From: Mechanique Thirty Hmm, I was getting the same results from llDetectedGrab() no matter where I clicked on my test prim, aside from some seemingly-random fluctuations in Z. Maybe I'll just stick with a handful of predefined colors after all... I've previously posted a colour server which may stop you from reinventing the (colour) wheel.... Building a menu system around it isnt that difficult
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-29-2006 06:52
From: Mechanique Thirty Hmm, I was getting the same results from llDetectedGrab() no matter where I clicked on my test prim, aside from some seemingly-random fluctuations in Z. Maybe I'll just stick with a handful of predefined colors after all... Actually it is a matter of semantics. llDetectedGrab should probably be called llDetectedDrag. Clicking the prim will not work. You have to click, hold down the mouse button, drag the mouse and then release it. Also llDetectedGrap only works with touch, not touch_start or touch_end.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
|
11-29-2006 08:34
This topic has been discussed here in more successful detail.
|
|
Mechanique Thirty
Pretty Spider
Join date: 15 Mar 2005
Posts: 60
|
11-29-2006 09:36
Hmm. I think that hacking around this is a lot more work than I'm willing to take on. Especially since it seems to only work when you <i>drag</i> the pointer, rather than just click. I'll think about alternative visual displays. Thanks for the suggestions and pointers, though!
|
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
11-29-2006 10:00
From: Mechanique Thirty I've been searching the forums to no avail: is there any way to find out where on a prim I clicked? I haven't even found people asking similar questions.
I'm working on a HUD for a color-changing avatar, and I'd like to have a color wheel as well as a handful of preset buttons. I figure I could put a circular rainbow texture on a disc, then do some math to change a click coordinate into a HSV value that roughly corresponds to the color under the click.
If not, well, I'll just have a larger selection of color presets... There doesn't seem to be a way to get exactly where on the prim the click was placed (there's some projects which use sort of prim grid overlaid over larger surface to determine the spot clicked on that larger surface with some precision and couple of clicks, but that's still work-arounds) Perhaps it'd be simpler to just convert your colour wheel into 6 buttons the user could click to finetune colour values picked from provided presets... o.O
|