|
powerMind, Newbie
Posted: 23 May 2012 10:53 PM Total Posts: 3
Hi! I have a big problem. I see in another post that you are talking about uv’s coordinates. So, i try in my mesh -> MyMesh.mouseDetails =true, but i can’t find this property.
Where is now? How can i do to get uv’s coordinates from a mouse click event on a mesh?
(Sorry for my bad english :O)
Greetings from Chile!
|
powerMind, Newbie
Posted: 24 May 2012 03:03 PM Total Posts: 3
[ # 1 ]
|
Richard Olsson, Administrator
Posted: 16 June 2012 02:11 PM Total Posts: 1192
[ # 2 ]
There’s a new property called mouseHitMethod that might help you. Set Mesh.mouseHitMethod to any of the values represented as constants on MouseHitMethod except the one called BOUNDS_ONLY, which will not result in UVs being calculated.
Note however that this system is being refactored again to be as robust and versatile as possible for the upcoming stable Away3D 4.0 (“gold”) release, so this will likely change soon, at which point code examples will be provided to explain the new system.
|
RIPI, Jr. Member
Posted: 18 July 2012 11:58 AM Total Posts: 33
[ # 3 ]
Hi!
So, Away3D 4.0 Gold is released – what to do with the mouseHitMethod?
//okay, i found the mousePicker.. no worry
|
Richard Olsson, Administrator
Posted: 18 July 2012 12:14 PM Total Posts: 1192
[ # 4 ]
Have a look at the example called Intermediate_MouseInteraction in the examples repository (link below). You’ll see that you have to define which global picking method to use on the view, and then per mesh you have to set the pickingCollider property, unless you’re using the “shader” global mouse picker in which case pickingCollider will be ignored. If you’re using the shader mouse picker the shaderPickingDetails is the property that you want to set to toggle detailed information in mouse events.
https://github.com/away3d/away3d-examples-fp11/blob/master/src/Intermediate_MouseInteraction.as
|
Fabrice Closier, Administrator
Posted: 18 July 2012 12:15 PM Total Posts: 1265
[ # 5 ]
Here a little snippet
m.mouseEnabled = true;
m.shaderPickingDetails = false;
//m.pickingCollider = PickingColliderType.BOUNDS_ONLY;
//m.pickingCollider = PickingColliderType.AS3_FIRST_ENCOUNTERED;
m.pickingCollider = PickingColliderType.PB_FIRST_ENCOUNTERED;
m.addEventListener(MouseEvent3D.MOUSE_DOWN, doSomething);
|
RIPI, Jr. Member
Posted: 18 July 2012 12:38 PM Total Posts: 33
[ # 6 ]
Thank you guys very much – i will try that later. I have to struggle with some missing textures and a significant performance drop first… ;(
|
ex0rcist, Newbie
Posted: 24 July 2012 03:41 PM Total Posts: 6
[ # 7 ]
Have same problem, in 4.0 beta mesh.mouseHitMethod = MouseHitMethod.MESH_CLOSEST_HIT; helped to click a mesh inside other mesh, but in gold I cant find a way to trigger a mouseevent3d on mesh that is inside another (that works in beta). Fix this please, or tell how do we make it right way?
|
Richard Olsson, Administrator
Posted: 24 July 2012 03:47 PM Total Posts: 1192
[ # 8 ]
Is the enclosing mesh opaque, or can you actually see the mesh you’re trying to hit? You should be able to get it to work using either PickingColliderType.AUTO_BEST_HIT or by switching View3D.mousePicker to the PickingType.SHADER option.
|
ex0rcist, Newbie
Posted: 24 July 2012 03:53 PM Total Posts: 6
[ # 9 ]
Yes, enclosing mesh is 0.6 alfa, and yes,
view.mousePicker = PickingType.SHADER;
parent_mesh.pickingCollider = PickingColliderType.AUTO_BEST_HIT ;
did the trick!
thank you very much!
P.S. But z-sorting problem was not fixed as I see :( Any forecasts?
|
Richard Olsson, Administrator
Posted: 24 July 2012 03:55 PM Total Posts: 1192
[ # 10 ]
What Z-sorting problem? Please create a separate thread if you have any issues not related to mouse-picking.
|