@@ 7,6 7,7 @@
*/
use bevy::prelude::*;
+use bevy_mod_picking::prelude::*;
use bevy_rapier3d::prelude::*;
use crate::{
@@ 72,7 73,17 @@ fn spawn_hand(
rigid_body: RigidBody::Fixed,
..Default::default()
})
- .insert(visual_card_kind::Hand(index));
+ .insert(visual_card_kind::Hand(index))
+ .insert(OnPointer::<Over>::target_component_mut::<Transform>(
+ |_over, transform| {
+ transform.translation.y += 0.2;
+ },
+ ))
+ .insert(OnPointer::<Out>::target_component_mut::<Transform>(
+ |_over, transform| {
+ transform.translation.y -= 0.2;
+ },
+ ));
}
ph_ev_w.send(PositionHandEvent);