Using the Ray class you would indeed with the projection of two rays get your uv's coordinates and via barycentric formula from the faces hitted extract a rectangle. The defined rect could then be compared with your mouse3devent... the hard way.
Simplest way would certainly be to define 2d rect on map. the mouseEvent3D returns you the uv's, define a Point from these x,y extracted from the uv's and a simple PointInRect would tell you if you have a hit. Fabrice On Apr 14, 2010, at 2:55 PM, Omar Fouad wrote: > Well thanks! This approach is what I've mentioned in the post. However the > dilemma is how to move the spots, according the rotation of the camera. I > don't need the spots to rotate around the x or the y axes, the can be flat, > but on the same specific place on the cylinder's material. > BTW thanks for your answers! > > On Wed, Apr 14, 2010 at 2:49 PM, Michael Iv <[email protected]> wrote: > Basically it can be made easier: I would create the hot spots as billboards > like DirSprite3D and make their alpha to zero . Than I would wrap them with > ObjectContainer ,then you can read the rotation angle of your camera , or if > you rotate the cylinder instead then read its rotation . And after that use > that value for angular displacement , I mean move your container on the > spherical path (basic trigonometry) according to that rotation . I could > write it here but I am at work now , sorry . > may at the weekend I ll post this case in my > blog.(http://blog.alladvanced.net) > > > On Wed, Apr 14, 2010 at 3:39 PM, Omar Fouad <[email protected]> wrote: > No :) I missed yours > > On Wed, Apr 14, 2010 at 2:23 PM, Michael Iv <[email protected]> wrote: > What? I missed your point or you missed mine? > > > On Wed, Apr 14, 2010 at 3:16 PM, Omar Fouad <[email protected]> wrote: > huh? > > > On Wed, Apr 14, 2010 at 2:12 PM, Michael Iv <[email protected]> wrote: > If you want to set the hot spots that will be located always relative to the > camera direction you can set directional sprites facing the camera with zer0 > alpha.And copying camera transformation matrix and direction (can cast a Ray) > you can figure out where to move these objects > > On Wed, Apr 14, 2010 at 2:56 PM, Omar Fouad <[email protected]> wrote: > Hi, > > I have a cylinder that has applied to it a BitmapMaterial, which is the > panorama image (landscape 360). I've zoomed the camera properly so it looks > great while panning left, right, up, and down. > What I really need to do now is to set a hot-spot on that view. in this > example (link: http://www.egypt.travel/?flashinstalled=2 ) i believe the > spots are not movieclip materials placed on top of the bitmap material (or > their rotationY angle would change with the camera rotation). I believe, that > is a layer placed on the stage on top of the View3D, that moves according the > camera panAngle. > But how can I give the spots x and y props and then, update them while > panning the camera? > > Thanks in advance. > > Cordially. > > > > -- > Michael Ivanov ,Programmer > Neurotech Solutions Ltd. > Flex|Air |3D|Unity| > www.neurotechresearch.com > Tel:054-4962254 > [email protected] > [email protected] > > > > > > -- > Michael Ivanov ,Programmer > Neurotech Solutions Ltd. > Flex|Air |3D|Unity| > www.neurotechresearch.com > Tel:054-4962254 > [email protected] > [email protected] > > > > > > -- > Michael Ivanov ,Programmer > Neurotech Solutions Ltd. > Flex|Air |3D|Unity| > www.neurotechresearch.com > Tel:054-4962254 > [email protected] > [email protected] > > -- To unsubscribe, reply using "remove me" as the subject.
