hello, i am having a strange bug.
Creating a mesh with sprites in simpleInit() will make it behave normal as expected, i can move the camera as close as i want without issues.
creating a mesh with sprites in simpleUpdate() (or just modifying) will make it appear correctly but if you move camera close it becomes invisible at random camera angles.
a) i have mesh.updateBound(); called in every frame so that is not a problem.
anyone know why this happens ? is there another method i should call when mesh is updated.
i will relook my code to see if it is my bug.
ok i solved it by adding : spriteGeometry.updateModelBound();
and jmp lies by saying that i dont have to call this method.
it says : “Updating is not needed in jme3, check your update order if you need to call this”.
so this means that mesh.updateBound(); is bugged and doesn’t work for geometries the mesh is inside.
spriteGeometry.updateModelBound() internally calls mesh.updateBound() automatically so i will only use spriteGeometry.updateModelBound();
Yeah, and really that should be true normally. @Momoko_Fan: Any way to make the bounds update a bit smarter for custom meshes?
@Normen: The mesh doesn’t know anything about the geometry so it can’t tell it that it needs to update. We need to keep the updateModelBound() in the case that a custom mesh has been updated after it was added to a geometry.
@Momoko_Fan: Yeah exactly, thats why I’m asking if you see any way to make it a bit smarter. E.g. animation updates the bounds itself too, maybe that can be globalized…
@Normen: Animation doesn’t update bounds. Particles update it on the geometry. The proper way is, unfortunately, using updateModelBound(). You will need to remove it from your list.