pickup item

This commit is contained in:
LorrensP-2158466
2025-04-06 18:15:44 +02:00
parent 18c0b00323
commit d626591d0d
3 changed files with 20 additions and 11 deletions

View File

@@ -157,11 +157,13 @@ fn spawn_objects(
Interact,
RigidBody::Dynamic,
Name::new("Id Card"),
Visibility::Visible,
ItemIcon::new(image_assets.id_card.clone()),
SceneRoot(asset.clone()),
))
.with_children(|parent| {
parent.spawn((
Visibility::Inherited,
ColliderMassProperties::Mass(10.0),
Collider::cuboid(0.05, 0.05, 0.01),
Transform::from_rotation(Quat::from_euler(
@@ -172,6 +174,7 @@ fn spawn_objects(
)),
));
parent.spawn((
Visibility::Inherited,
ActiveEvents::COLLISION_EVENTS,
Transform::default(),
Collider::ball(0.5), // Interaction radius