Did I missed a breaking change or is this wai? I have not stepped thru the old versions to isolate as the pgs are not loading for me atm. In my local dev, v9.6.2 is also showing the same so I guess that’s a clue.
edit: updated pg cos I missed the crucial mesh.thinInstanceRefreshBoundingInfo(true);
It wasn’t really a bug/regression: applying baked vertex animation when refreshing thin-instance bounding info simply wasn’t implemented yet.
The new behavior is opt-in, for example with thinInstanceRefreshBoundingInfo(true, false, false, true), to avoid changing existing behavior. Note that enabling it can be taxing on performance because the bounding box is recalculated on the CPU; if the animation changes every frame, accurate bounds require refreshing every frame.
Yes, regular InstancedMesh is the same kind of case.
With the PR, the opt-in path for regular instances is through the refreshBoundingInfo options object. refreshBoundingInfo(true) only uses the old boolean signature (applySkeleton), so it won’t apply VAT. For your PG, the call should be something like:
The explicit bakedVertexAnimationSettings part matters when each instance has its own VAT settings in instancedBuffers. If you rely on the manager’s global animationParameters, then only applyBakedVertexAnimation: true is needed.
Same performance caveat applies: this recomputes the bounds on the CPU, so if manager.time changes every frame and you need accurate bounds every frame, this refresh should also happen every frame.
Small correction to my previous snippet: the equivalent of the old refreshBoundingInfo(true) call should carry that boolean through the options object, and for this per-instance refresh it is better not to update the source mesh positions cache.
bakedVertexAnimationSettings is the options field name; in this case its value comes from the instance’s bakedVertexAnimationSettingsInstanced instanced buffer. If the mesh uses the manager’s global animation parameters instead of per-instance VAT settings, that override can be omitted.