fix light viz

This commit is contained in:
Joe Ardent 2023-01-20 17:21:12 -08:00
parent efb70e16d0
commit 065af95aa0
1 changed files with 6 additions and 5 deletions

View File

@ -53,13 +53,14 @@ fn spawn_moving_lights(
..Default::default() ..Default::default()
}; };
let sbundle = SpatialBundle {
transform: Transform::from_rotation(rotation),
..Default::default()
};
commands commands
// first, spawn an entity with a transform we can rotate // first, spawn an entity with a transform we can rotate
.spawn(( .spawn((AnimatedCyberLight { axis, rate },))
AnimatedCyberLight { axis, rate }, .insert(sbundle)
Transform::from_rotation(rotation),
GlobalTransform::default(),
))
.with_children(|parent| { .with_children(|parent| {
parent parent
// now spawn a child entity with a pointlight, and a relative transform that's // now spawn a child entity with a pointlight, and a relative transform that's