Open JulienRobidet opened 11 years ago
Do you speak about:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb206245(v=vs.85).aspx
Yes, it's the same concept. The MouseEvent3D.uv point return value between 0 and 1 but in case i have negative value or value up to 1 !
It's the same concept in the tutorial https://github.com/away3d/away3d-tutorials-fp11/blob/master/tutorials/picking/overview/src/PickingTutorialListing06.as
To use PickingColliderType.PB_BEST_HIT; You need to convert the subgeometry to separate buffers. eg myMesh.geometry.convertToSeparateBuffers();
Yes, Thank You !
It's work fine !
All ok julienjules ? I know John... and most of the times has reason ! :)
Can we confirm whether this is still an open issue?
Not an issue. my above comment stands :) Its how pixelBender picking works. See comments in PickingColliderType
UV values with other pickers don't need the convertToSeparateBuffers and they work.
Hi guys!
I try to get the uv point when i make a MouseEvent3D.MOUSE_DOWN or MouseEvent3D.CLICK.
The MouseEvent3D are added to Mesh 3DS object but the value are so strange, sometimes negative or up to 1 !
My code :
// get object Mesh from MaxLoader mesh = Mesh(e.target.getChildAt(0)); mesh.pickingCollider = PickingColliderType.PB_BEST_HIT; mesh.mouseEnabled = true; mesh.shaderPickingDetails = true; mesh.showBounds = true; _customContainer.addChild(mesh); // mesh.addEventListener( MouseEvent3D.CLICK, onObjectMouseClick ); mesh.addEventListener( MouseEvent3D.MOUSE_DOWN, onObjectMouseDown );
//on the View3D, i have try with RAYCAST_FIRST_ENCOUNTERED and SHADER _view.mousePicker = PickingType.RAYCAST_BEST_HIT;
Trace results : onObjectMouseDown :: (x=-1.2730845106366644, y=-0.4799215527091153) onObjectMouseClick :: (x=-1.2730845106366644, y=-0.4799215527091153) onObjectMouseDown :: (x=0.4307245809631275, y=1.6171833446040405) onObjectMouseClick :: (x=0.4307245809631275, y=1.6171833446040405) onObjectMouseDown :: (x=0.5078431005753847, y=0.29315549028033805) onObjectMouseClick :: (x=0.5078431005753847, y=0.29315549028033805) onObjectMouseDown :: (x=-0.0360301736098147, y=-0.07157051371327405) onObjectMouseClick :: (x=-0.0360301736098147, y=-0.07157051371327405) onObjectMouseDown :: (x=-1.0415662351191055, y=-0.4383013228279313) onObjectMouseClick :: (x=-1.0415662351191055, y=-0.4383013228279313)
Thx for your support !