actionscript - how I can get mouse z coordinates on flex papervision3d? -


I'm working on Panoramic view. And I want to move an aircraft with the cursor. When I move the mouse, the plane must have mouse coordinates. And I want to coordinate the plane to 3D (X, Y, Z), especially z-coordinating I try the code below but it does not work correctly, there are no coordinates on the mouse and plane screens. How can i Public Category Retraser {Receiving Public Static Function (Viewport: Viewport 3D, Camera: CameraAbject 3D, Normal: Array): Number 3D {var Aircraft 3D: Plane 3D = New Plane 3D (); Plane3D.setNormalAndPoint (new number 3D (0, 1, 0), new number 3D (0, 0, 0)); Var Camera Status: Number 3D = New Number 3D (camera.x, camera.or, camera.j); Var Re: Number 3D = Camera. Project (Viewport Containersproti.mouse, Viewport Containersprit.Mushi); Ray = number 3d.ed (ray, camera position); Var intersect: number3d = plane3D.getIntersectionLineNumbers (cameraposition, ray); Return intersections; }}

As far as I know that there is no Z coordinate with the mouse PV 3D

Comments