Am I crazy? No, really.

TIA,
Nebbisk
These forums are CLOSED. Please visit the new forums HERE
Image maps? |
|
|
Nebbisk Oh
Registered User
Join date: 8 Mar 2007
Posts: 3
|
05-01-2007 01:07
As a n00b scripter, my head is spinning from all of the places I've looked to dig out little bits of LSL information. I could have sworn I read that it's possible to tell where in a prim the mouse was clicked (like HTML Image Maps), or barring that, at least tell which face of the prim was touched.
Am I crazy? No, really. ![]() TIA, Nebbisk |
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
05-01-2007 09:55
You're crazy. It's not possible.
_____________________
--AeonVox--
Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music. |
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
05-01-2007 10:20
You are not that crazy.
I remember it also. I believe what was used is a prim and a hud. The hud and prim tell it's location relative to the av. The hud then reads where the camera is pointed at and translate that to a position on the prim. |
|
Parker McTeague
dubious
Join date: 28 Sep 2004
Posts: 198
|
05-01-2007 10:49
image maps in sl, like for a hud or control box, would generally be done like in html. you make one texture that contains the buttons, and define areas that are clickable. in the case of sl it's prims that contain scripts, though they might be transparent. if you want a button to change state visually you'd have the texture on the button itself.
_____________________
low prim, modern houses from Park Life!
visit my store at Deco 148, 148 blog: http://parklife.5pointstudio.com/ |
|
Nebbisk Oh
Registered User
Join date: 8 Mar 2007
Posts: 3
|
05-01-2007 10:50
That's interesting, Destiny. I haven't done anthing with cameras in LSL yet, but it sounds like what you're saying would only work in Mouselook mode. Does that sound right?
Parker, I understand what you're saying, and that's exactly what I plan to do, except I can't figure out how to define those hot spots, e.g. tell where in the prim the user meant to click. Sure, it would be nice if, like in HTML, LSL allowed hot spot definition directly, but if that's provided anywhere, I surely don't know where! |
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
05-01-2007 13:33
Nebbisk...
Parker's method requires adding prims with different textures together...much like creating CSS columns...(Col1 = Prim1, Col2 = Prim2) or *shiver* table cells. Just like a 'hotspot' (usin' Macromedia, eh?) is nothing but sliced up images placed together...a prim 'hotspot' is nothing but sliced-up prims put together. _____________________
--AeonVox--
Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music. |
|
Ina Centaur
IC
Join date: 31 Oct 2006
Posts: 202
|
05-01-2007 19:06
one way i have been getting a single prim to be clickable in multiple regions with multiple results, like an html image map:
1. have the user "throw" a temp prim at the "image map prim" 2. image map prim determines velocity vector of the hit. 3. the velocity vector is transformed into one off 4 different "image map" regions. ~ thus, a single prim is used for 4 different click spots ;-D |
|
Nebbisk Oh
Registered User
Join date: 8 Mar 2007
Posts: 3
|
05-01-2007 23:14
First of all, I want to thank all who responded to this question. Whether I ultimately solve the problem or not, you've opened my eyes to a number of new things about LSL and have given me incentive to learn about areas for which I saw little prior use.
Kenn, no, I'm not a Macromedia guy, nor am I a CSS or even an HTML expert. I'm an old fart whose specialty is developing complex algorithms and data structures. I've spent my whole career working on "engines" like the internals of spelling checkers and fancy search engines, and I've managed to avoid doing very much interface work until now. (As a humorous side note, after reading your message I came very close to googling "shiver tables." DOH!) Oh! While writing this I finally understand what Parker was saying (with Kenn's clarification). It doesn't solve my problem because my main goal is to provide a menu of selections using a single prim. Ina, on the other hand, has hit the nail on the head. That is an amazingly brilliant, devious solution to the problem -- even if it is limited in resolution. Here's what I'm going to do: The first version of my project will use a panel which simply brings up a menu -- that will satisfy basic functionality. Then I intend to look into Ina's approach for version 2... what fun that will be! Thanks again, Nebbisk |
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
05-02-2007 08:41
I'm hurt, you didn't want to try the advance trig method of finding the rotation of a camera and calculating the intersection point on the prim
![]() jk |
|
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
|
05-02-2007 09:31
|
|
bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
|
05-02-2007 10:11
I've done some exploratory work with floating transparent prims over a map, where I can rearrange the UI from one state to another. As you can imagine, a sophisticated map is going to take a fair number of prims.
If we had strips of prims arranged in rows, overlapped with columns, and could get a touch events for, say, "the row 2 prim, AND the column 3 prim", that would help. What is really needed is a touch_xyz() event. It doesn't have to work for every last prim. Just being able to pick up x & y over a flat surface would be a huge step forward. _____________________
Bucky Barkley -- Mammal, Scripter, Builder, Lover
|