ThankYou very much! That Worked for me :) Now I'm trying to get hited object dynamicaly added to BSPTree.
after: _bspHitTest.getUVIntersectPosition I do: _bspHitTest.lastHittedMeshName and for the first hit i usualy get the name, but for other hits alwaus null. Meaby there is some better way to determine hited object in BSPTree? Thanks again Fabrice, Regards, MG On 16 Lis, 00:53, Fabrice3D <fabric...@gmail.com> wrote: > _endPos.x = 0; > _endPos.y = 0; > _endPos.z = RANGE; > _endPos.transform(_endPos, _camera.sceneTransform); > > var position:Number3D = _bspHitTest.getIntersectPosition(_camera.position, > _endPos); > > if you want project the mouse, use _view.mouse coordinates > var pMouse:Number3D = _view.camera.unproject(_view.mouseX, _view.mouseY); > > Fabrice > > On Nov 15, 2010, at 11:11 PM, macgor wrote: > > > Hi, > > > I'm trying to somehow use BSPHitTest class to get coordinates where > > did I click on the wall. I can't figure it out how to use methods in > > this class to get this position. I have also some dynamicaly added > > planes to BSPTree and also i need to get know what plane did I hit. > > > bspHit.getIntersectPosition(_view.camera.position,_view.camera.unproject(mouseX,mouseY)) > > ?? > > or somehow? > > > I'm too stupid to figure it out probably.... so please help anybody:) > > > Regards, > > > MG