I want to get the x,y and z position when mouse over a mesh, because I want to add a new mesh on that surface.
it it possible to do that ?
get mouseX mouseY and mouseX on a meshSoftware: Away3D 4.x |
||
cwoandrew, Newbie
Posted: 06 July 2012 02:05 AM Total Posts: 6 I want to get the x,y and z position when mouse over a mesh, because I want to add a new mesh on that surface. it it possible to do that ? |
||
|
||
Richard Olsson, Administrator
Posted: 11 July 2012 08:30 AM Total Posts: 1192 [ # 2 ] As long as mouseDetails is true, you should be able to use the sceneX, sceneY and sceneZ properties of the mouse event. |
||
cwoandrew, Newbie
Posted: 12 July 2012 02:27 AM Total Posts: 6 [ # 3 ] Now I can get the mesh center by using
mesh.mouseEnabled = true;
However, when I added:
mesh.mouseDetails = true;
It has error: Error: Access of possibly undefined property mouseDetails through a reference with static type away3d.entities:Mesh. so, could I get a point on a mesh? Thank you very much! |
||
Richard Olsson, Administrator
Posted: 12 July 2012 07:47 AM Total Posts: 1192 [ # 4 ] What codebase are you using? Are you getting Away3D from GitHub, and if so, what branch? The mouseDetails property was recently renamed in the release branch to shaderPickingDetails, since it only applies if you use the PickingType.SHADER picker for View3D.mousePicker. If you are using any of the PickingType.RAYCAST* properties you should be getting the mouse details for free. |