MD360Player4Android
MD360Player4Android copied to clipboard
发现一个关于hit和显示的bug
当我们绘制时,会按照z order从小到大的顺序进行绘制,而现在addplugin就没有对z order进行排序,会导致plugin会先绘制先加入的,再绘制后加入的。 同样的,在hitTest函数中,应该是按照z order从大到小进行判断,如果已经检测到,那么要break。前提是plugins要排序好 for (MDAbsPlugin plugin : plugins) { if (plugin instanceof IMDHotspot) { IMDHotspot hotspot = (IMDHotspot) plugin; MDHitPoint tmpDistance = hotspot.hit(ray); if (!tmpDistance.isNotHit() && tmpDistance.nearThen(currentDistance)){ hitHotspot = hotspot; currentDistance = tmpDistance; break; } } }