{"id":350,"date":"2022-08-30T14:59:53","date_gmt":"2022-08-30T14:59:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/06\/problem-about-ray-picking-collection-of-common-programming-errors\/"},"modified":"2022-08-30T14:59:53","modified_gmt":"2022-08-30T14:59:53","slug":"problem-about-ray-picking-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-ray-picking-collection-of-common-programming-errors\/","title":{"rendered":"problem about ray-picking-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aa625072dde6a8af5816faac35973fa3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nhexacyanide<br \/>\nthree.js picking ray-picking mouse-picking<br \/>\nHere is my jsfiddle: HereHere is my previous version jsfiddle without implementing picking, if you want to try it from start: HereMy custom geometry in the scene are having multiple materials which I couldn&#8217;t pick them. Please help me to resolve this issue. var subset; var meshMaterial, camera, projector = new THREE.Projector(),scene, renderer, container; var width = window.innerWidth,height = window.innerHeight; var mouse = {x: 0,y: 0 }, INTERSECTED;function change() {subset = new Array();init();animate(); } meshMaterial = [ new THREE.MeshLambertMaterial({color: 0xffffff,opacity: 0.6,depthWrite: false,depthTest: false,vertexColors: THREE.VertexColors }), new THREE.MeshLambertMaterial({color: 0xffffff,opacity: 1,depthWrite: false,depthTest: false,vertexColors: THREE.VertexColors })]; \/\/ camera = new THREE.CombinedCamera(width \/ 2, height \/ 2, 70, 0.1, 1000, -1000, 1000); camera.position.z = 45; scene = new THREE.Scene();function init() {for (var i = 0; i &lt; document.getElementById(&#8216;txtN&#8217;).value; i++) {var conegeo = new THREE.Mesh(getGeometry(meshMaterial), new THREE.MeshFaceMaterial(meshMaterial));subset.push(conegeo);conegeo.doubleSided = true;conegeo.overdraw = true;conegeo.position.set(i * (0.5 &#8211; Math.random()) * scale, (0.5 &#8211; Math.random()) * scale, (0.5 &#8211; Math.random(<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-06 03:13:41. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>hexacyanide three.js picking ray-picking mouse-picking Here is my jsfiddle: HereHere is my previous version jsfiddle without implementing picking, if you want to try it from start: HereMy custom geometry in the scene are having multiple materials which I couldn&#8217;t pick them. Please help me to resolve this issue. var subset; var meshMaterial, camera, projector = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-350","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=350"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/350\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}