From 065af95aa04ff106d43e3998f5c35b22ba14d3f9 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Fri, 20 Jan 2023 17:21:12 -0800 Subject: [PATCH] fix light viz --- src/lights.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lights.rs b/src/lights.rs index 3f1747f..194a8fa 100644 --- a/src/lights.rs +++ b/src/lights.rs @@ -53,13 +53,14 @@ fn spawn_moving_lights( ..Default::default() }; + let sbundle = SpatialBundle { + transform: Transform::from_rotation(rotation), + ..Default::default() + }; commands // first, spawn an entity with a transform we can rotate - .spawn(( - AnimatedCyberLight { axis, rate }, - Transform::from_rotation(rotation), - GlobalTransform::default(), - )) + .spawn((AnimatedCyberLight { axis, rate },)) + .insert(sbundle) .with_children(|parent| { parent // now spawn a child entity with a pointlight, and a relative transform that's