Hi,
SimpleVector temp=Interact2D.reproject2D3D(camera,buffer,x,y);
int[] polygon=Interact2D.pickPolygon(world.getVisibilityList(),temp);
if (polygon!=null)
{
PolygonManager poly=world.getObject(polygon[1]).getPolygonManager();
int u=poly.getMaxPolygonID();
}
in some cases, I found that u<polygon[0]. worse, polygon[0]<0! How is it possible?
Those objects in the world loaded from .3ds. This is it.
for (int i=0;i<scene.length;i++)
{
scene.createTriangleStrips(2);
scene.setCollisionOptimization(true);
scene.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
scene.enableLazyTransformations();
scene.build();
world.addObject(scene);
}
I tried to merge the scene together. But, I still get the same result.
Thank you.