Add Vec3::one * 0.5 to sprite item drop position instead of Vec3::unit_z, this should put the new enity in the center of the voxel that the sprite occupied

This commit is contained in:
Imbris 2023-03-10 02:50:08 -05:00
parent 2d66145620
commit dd6e6ccf91

View File

@ -370,7 +370,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv
sprite_pos.x as f32,
sprite_pos.y as f32,
sprite_pos.z as f32,
) + Vec3::unit_z(),
) + Vec3::one() * 0.5,
))
.with(comp::Vel(Vec3::zero()))
.build();