Hey, I don't know what you are trying but a possible fix if you just need the coordinate on the plane is:
e.uv.x and e.uv.y. If you use e.uv.x you get a coordinate between zero and one. Then you can multiply that number by the width and height of your plane and get the real coordinate inside your plane. The localX and localY are variables to get the position inside the current object space. See away3d.events.MouseEvent3D line 102 and 113. Hope this helps, Frank /** * The x-coordinate in object space where the event took place */ public var localX : Number; /** * The y-coordinate in object space where the event took place */ public var localY : Number; /** * The z-coordinate in object space where the event took place */ public var localZ : Number; On 10 mrt, 15:16, GameDeveloper <[email protected]> wrote: > where Mr. Bateman when you need him, lol :D > Rob is doing wonderfull work here, just this problem is causing me a > bit of a pain. > > On Mar 10, 1:52 pm, GameDeveloper <[email protected]> wrote: > > > > > > > > > just tried it outside of the ObjectContainer3D and same result :( > > > On Mar 10, 1:30 pm, GameDeveloper <[email protected]> wrote: > > > > 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
