So I am working on an editor for my game that require to merge (batch) several smaller scenes of the same structure/material into one big scene, by combining vertices/texCoords/indices together, and I notice BoundingBox doesn’t update after combination.
I don’t have a small program to demonstration the problem at the moment, but the steps is like this:
- Load the scene (glTF file)
- Make a clone out of it (because I want to combine other scenes’s vertices/indices/texCoords into this one, but still keep the material), by calling Clone method
- Clear indices/vertices/texCoords of the clone
- Combine other scenes to the clone, recalculate indices/vertices when needed.
- Call the clone’s ChangedAll method
I expected the clone’s BoundingBox to be recalculated to match the new data, but looks like it does not . The bbox is still the same like it was before combination, even though the scene’s data is already updated correctly (visual on screen).
Did I miss something? Maybe I need to call something else to trigger the calculation? Please enlighten me