I do not think my approach is the correct one. I have a camera controller that I want to change what transform it follows. To rephrase I want to switch between multiple transforms that my camera will follow. Here is what I do today for context:
#[derive(Component)]
pub struct FollowMarker;
commands.spawn((PbrBundle {
mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
material: materials.add(Color::srgb_u8(124, 144, 255)),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
..default()
},
FollowMarker,
));
pub fn update_follow(
mut query: Query<&mut Transform, With<FollowMarker>>,
) {
}