Hello,
I want to make a simple card UI system (like Hearthstone, Gwent, or Slay The Spire etc.. but no so elaborate just want to display card in bottom and launch a tween animation on hover) . So I made a Box with a 0.1 depth, I first tried to attach it to my camera as children but it doesn't worked as expected so I made a system like this ```fn update_cards_pos(
camera_query: Query<&GlobalTransform, With<MainCamera>>,
mut card_query: Query<&mut Transform, With<Card>>,
) {
if let Ok(global_transform) = camera_query.get_single() {
if let Ok(mut card_transform) = card_query.get_single_mut() {
let transform = global_transform.compute_transform();
let translation =
transform.translation + transform.down() * 0.29 + transform.forward() * 1.0;
card_transform.translation = translation;
card_transform.rotation = transform.rotation;
}
}
}
somehow it "works" it is following and facing my camera but I move the camera there is a little between my camera moves and the card moves. And I feel like this isn't the right way to do it. So my question is does anyone has resources to share that explain how can I achieve this properly ?
Thank you for help