Hi everyone,
I’m currently exploring the BatchedMesh class and have a question about deleting instances and geometries.
In my use-case I have a dynamically changing scene in which new geometries are added to a BatchedMesh. Afterwards instances of the geometry are generated (analogous to the example here).
Subsequently instances may be removed and I currently have a logic to delete geometries once there is no instance using it anymore. However the deleteGeometry call fails with an error as it attempts to delete instances that have previously already been deleted.
Looking at the code, it seems like deleteInstance mainly sets the active property on the corresponding instanceInfo entry to false (link). But that property is not used to check whether to again delete the instance when deleting the geometry. And then validateInstanceId fails.
Is this behavior intended or do I misunderstand something?
Thanks for any input,
djz