private function initObjects():void { var plane:Plane = new Plane(new ColorMaterial(0xff0000), 500, 500); plane.x = 200 plane.rotationY = 45 scene.addChild(plane)
plane.mouseEnabled = true; plane.mouseDetails = true; //<-- needed for UV and local XYZ position. If you dont need uv or local disable plane.addEventListener(MouseEvent3D.CLICK , click); } private function click(e:MouseEvent3D):void { trace("you clicked"); trace("Objects local position " + Object3D(e.target).position); trace("Objects world position " + ObjectContainer3D(e.target).scenePosition); //will be same as above as the plane is not parented trace("Stage Position" + e.screenX, e.screenY); trace("Objects UV position " + e.uv ); // needs mouseDetails trace("Click in Objects space" + e.localX, e.localY, e.localZ); // needs mouseDetails }