Hello!
In our project Geometry is updated interactively: user can drag control points, mesh is regenerated automatically.
On next update() Geometry.updateModelBound() is called. Bounding box is calculated correctly and Geometry is visible.
But we have an issue with collision detection: world Bounding box is not updated, so collision doesn’t detected!
Geometry.updateWorldBound() is called by engine. Geometry in its turn calls Spatial.updateWorldBound(), which resets refreshFlags before actual update of world bounding box.
[java]
protected void updateWorldBound() {
// the world bound of a leaf is the same as it’s model bound
// for a node, the world bound is a combination of all it’s children
// bounds
// -> handled by subclass
refreshFlags &= ~RF_BOUND;
}
[/java]
Geometry.collideWith() calls checkDoBoundUpdate().
[java]
void checkDoBoundUpdate() {
if ((refreshFlags & RF_BOUND) == 0) {
return;
}
[/java]