_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

Reply via email to