Ahh dunno if it that LineSegment will help you any. How about just creating a bunch of in between Number3D's , and checking the distance to those (if anything is close to them) ?
I guess you'd need at least as many Number3D's as the length of the ray divided by the collision radius, or almost double that number to be safe. -Pete On Mon, Feb 2, 2009 at 4:06 PM, phreakquency <[email protected]> wrote: > > Thanks. Maybe I should have mentioned earlier, that > This is part of my work on a LENSFLARE system for Away3d. > > Parts: > 1 - LENSFLARE MovieClip that contains all 2D assets and listens for > lensflare position > on stage to move and scale assets for the desired look. > > 2 - a few lines of code that set the LENSFLARE_LIGHTSOURCE variable to > an Object3D. > ScreenVertex tracking links the LENSFLARE.x and y to the > LENSFLARE_LIGHTSOURCE in Away3d. > > 3. LENSFLARE_LINE_OF_SIGHT is the line segment connecting between the > LENSFLARE_LIGHTSOURCE and the CAMERA > > 3 - The Width of the LENSFLARE_LIGHTSOURCE sets the width of the > LENSFLARE_LINE_OF_SIGHT RADIUS > This determines how intense the flare is, and implements into the > detection for the > COLLISION of anything intersecting the LENSFLARE_LINE_OF_SIGHT so that > if the LENSFLARE is obscured by anything, > the alpha and intensity of the flare are reduced towards 0 until > covered entirely, and increase back again when revealed. > > I first tried using a cylinder as the LENSFLARE_LINE_OF_SIGHT. It's > probably much easier > for figuring out intersections, but once again, > using a cylinder or a line segment won't update properly as I > mentioned in the earlier posts. > > the LENSFLARE_LINE_OF_SIGHT is an invisible element, > which might update in realtime, but I can't tell if I can't see it. > > Want to share this with everybody as soon as I am finished with it. > > This has been haunting my sleep for a while now. > > thx > Phreakquency > > > On Feb 2, 12:38 pm, Peter Kapelyan <[email protected]> wrote: > > I had modified LineSegment to have a "segments" parameter - so the line > > could be subdivided say 20 times etc. > > > > If you did a distanceTo() check on each of the segment start or end > vertice, > > you could get somethign really close to what you want. > > > > If you think the new LineSegment I created would help you , let me know, > > I'll try to get it to you or into the trunk ASAP. > > > > -Pete > > > > On Mon, Feb 2, 2009 at 3:09 PM, phreakquency <[email protected]> > wrote: > > > > > Additionally, I've got the line segment successfully connected > > > to an object and the camera. Only problem is whenever I move the > > > camera > > > the line does not update instantly and takes a moment to move from the > > > last camera > > > position to the new one. > > > > > boundingRadius trace also is returning what seems to be the length of > > > the line. > > > > > what about a radius around the width of the line? > > > > -- > > ___________________ > > > > Actionscript 3.0 Flash 3D Graphics Engine > > > > HTTP://AWAY3D.COM <http://away3d.com/> > -- ___________________ Actionscript 3.0 Flash 3D Graphics Engine HTTP://AWAY3D.COM
