pickup item
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user