#How to know when GlobalTransform is ready for scene descendants

3 messages · Page 1 of 1 (latest)

proven phoenix
#

I'm trying to calculate the AABB of an entire scene. I've realized I need to wait until the scene is fully loaded before all mesh GlobalTransform components are calculated.

I've an asset loader which is supposed to delay the scene AABB calculation, however, it doesn't seem to be working. Specifically, it doesn't seem to wait until the GlobalTransform of the scene's children are calculated before signaling the scene is fully loaded.

Code can all be found in Github:
https://github.com/Ladvien/bevy_scene_tools/blob/main/src/lib.rs
(Apologies for the untidiness; actively debugging.)

GitHub

A collection of tools for working with Bevy scenes. - bevy_scene_tools/lib.rs at main · Ladvien/bevy_scene_tools

elder bane
#

Have you tried running the AABB calculation after TransformPropagate in CoreStage:PostUpdate?

proven phoenix
#

I’ve not. Probably the guidance I needed. I’ll try and report back. Thanks, ira!