the _mousePlane is within a ObjectContainer3D if that helps?
On Mar 10, 1:03 pm, rhys thomas <[email protected]> wrote: > Hi guys im having a little trouble getting the MOUSE_MOVE event to fire > correctly more than once, I'll explain a little first.... > > I'm currently slapping a Plane on screen and trying to get the 3D mouse > position by reading the MOUSE_MOVE event on top of this plane. > This seems to only work the first time, im using Away3D broomstick > > this is a sample of the source code: > > private function mouseOverPlane(e:MouseEvent3D):void > { > trace(e.localX, e.localY, e.localZ); > _mousePlane.removeEventListener(MouseEvent3D.MOUSE_MOVE, > mouseOverPlane); > _mousePlane.addEventListener(MouseEvent3D.MOUSE_MOVE, > mouseOverPlane); > _mousePlane.mouseDetails = true; > //_mousePlane.x = e.localX; > //_mousePlane.z = e.localZ; > } > > the function gets triggered by a MouseEvent3D and I have..... > _mousePlane.mouseEnabled = true; > _mousePlane.mouseDetails = true; > > but my reulting traces are as follows: > > -8.603857274102154 0 -119.83624108971621 > NaN NaN NaN > NaN NaN NaN > NaN NaN NaN > NaN NaN NaN > NaN NaN NaN > NaN NaN NaN > NaN NaN NaN > NaN NaN NaN > etc etc.... > > So really unsure as to why the event fires the first time and then the > result is not a number afterwards. > As you can see I'm even removing the event listeners and then adding them > again but still with same result as does resetting mouseDetails to true each > time. > Any ideas anyone please? > Thanks in advance. > -Rhys Thomas
