THANK YOU VERY MUCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :- D
On 22 Gru 2010, 17:20, Fabrice3D <[email protected]> wrote: > Some bug fixes we made in last few hours to 3.6 > > In case of BSPTree projects the MouseEvent3D has been restored. > It is made for meshes addChilded to the tree, NOT the tree itself. You are > inside a closed space, so you always > hit the bounds. However if you add a mesh to the tree, you probably want to > add some interaction as on any meshes > in a regular scene. > > Here a quick example (code snippet from a Prefab output) of a cube added to > the tree > If you would mouseDown the cube inside the tree, it would say "bam click > click!" > > I let you imagine better use of the MouseEvent3d inBSP:) > > Fabrice > > _tree = BSPTree(AWData.parse(new BSPFile())); > _view.scene.addChild(_tree); > _tree.usePVS = true; > > _bspCollider = new BSPCollider(_view.camera, _tree); > _bspCollider.testMethod = > BSPTree.TEST_METHOD_ELLIPSOID; > _bspCollider.flyMode = _flightMode; > _bspCollider.maxClimbHeight = 50; > _bspCollider.maxIterations = 4; > > _bspCollider.minBounds = new Vector3D(-80,-200,-80); > _bspCollider.maxBounds = new Vector3D(80,40,80); > > var cube:Cube = new Cube({width:40, height:40, > depth:40}); > cube.x = 100; > cube.y = -1200; > cube.z = 100; > cube.addOnMouseDown(bla); > cube.collider = true; > _tree.addChild(cube); > > addChild(_view); > addEventListener(Event.ENTER_FRAME, onEnterFrame); > } > > private function bla(e:MouseEvent3D):void > { > trace("bam click click!"); > }
