reduce placement dst

This commit is contained in:
griffi-gh 2023-02-14 23:48:47 +01:00
parent 16a570803f
commit 496de05f27

View file

@ -23,7 +23,7 @@ pub fn block_placement_system(
let Some(ray) = (&main_player, &raycast).iter().next().unwrap().1/**/.0 else { return }; let Some(ray) = (&main_player, &raycast).iter().next().unwrap().1/**/.0 else { return };
//get coord and block type //get coord and block type
let (place_position, place_block) = if action_place { let (place_position, place_block) = if action_place {
let position = (ray.position - ray.direction * 0.5).floor().as_ivec3(); let position = (ray.position - ray.direction * 0.251).floor().as_ivec3();
(position, Block::Cobblestone) (position, Block::Cobblestone)
} else { } else {
(ray.block_position, Block::Air) (ray.block_position, Block::Air)