Hello is there any way to fix this? Depending on the camera angle certain polys of transparent objects seem to appear in front of things that they should be behind.



This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
Object3D obj = data.getObject();
Camera cam = visualWorld.getCamera();
SimpleVector desti = new SimpleVector(cam.getPosition());
SimpleVector objCenter = obj.getTransformedCenter();
SimpleVector dest = desti.calcSub(objCenter);
System.out.println(objCenter.x + " " + desti.x + " " + objCenter.y + " " + desti.y);
//dest=dest.normalize();
// dest.scalarMul(0.05f);
obj.translate(dest);
objCenter = obj.getTransformedCenter();
System.out.println(objCenter.x + " " + desti.x + " " + objCenter.y + " " + desti.y);
SimpleVector dest = new SimpleVector(0, 0, 0);
dest=Interact2D.reproject2D3DWS(cam, fb, (int)xpos, (int)ypos);
Object3D newObj = Primitives.getBox(5f, 5f);
newObj.setOrigin(dest);
world.addObject(newObj);
newObj.strip();
newObj.build();
Page created in 0.014 seconds with 8 queries.