render: only run system_update_world_transforms for scenes that were modified

This commit is contained in:
SeanOMik 2024-04-18 22:38:15 -04:00
parent 25aa902e02
commit 3c73e1d7e2
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
1 changed files with 4 additions and 2 deletions

View File

@ -466,8 +466,10 @@ impl Renderer for BasicRenderer {
if let Some((scene_han, scene_epoch)) = scene_pair {
if let Some(scene) = scene_han.data_ref() {
if scene_epoch == last_epoch {
let view = scene.world().view::<(Entities, &mut WorldTransform, &Transform, Not<Has<RelationOriginComponent<ChildOf>>>)>();
lyra_scene::system_update_world_transforms(scene.world(), view).unwrap();
}
let interpo_pos = self.interpolate_transforms(now_inst, last_epoch, entity, &transform, transform_epoch);