Mouse Picking about SubMesh ???

Software: Away3D 4.x

ggisgg, Newbie
Posted: 13 May 2013 06:59 AM   Total Posts: 1

hi everyone :

there is something wrong about the SubMesh’s picking

i hava a mesh with two parts, in other words, it has two subgeometries,

when they have the region of intersection, i can’t pick the SubMesh i want to pick .

please help me! thanks !

 

File Attachments
subMeshPicking.zip  (File Size: 1029KB - Downloads: 187)
   

Avatar
Rob Bateman, Administrator
Posted: 16 May 2013 03:59 PM   Total Posts: 120   [ # 1 ]

Hey ggisgg

The behaviour of mouse picking on bounds is controlled globally by the RaycastPicker object set on the view. It takes a global value because the bounds collisions test are much more coarse (and thereore fast) than the triangle collisions test - which can be set per-mesh on the pickingcollider

to enable sorted bounds picking, you just need to add the line:

view.mousePicker = PickingType.RAYCAST_BEST_HIT

That should then ensure the bounds for meshes and submeshes are always sorted correctly

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X