@@ -120,7 +120,8 @@ fn try_change_position(
120
120
is_within_speed_limits ( * * position, proposed) ?;
121
121
122
122
// Only check collision if we're starting outside a block
123
- if !has_collision ( position, size, blocks) && has_collision ( & proposed, size, blocks) {
123
+ if !has_block_collision ( position, size, blocks) && has_block_collision ( & proposed, size, blocks)
124
+ {
124
125
return Err ( anyhow:: anyhow!( "Cannot move into solid blocks" ) ) ;
125
126
}
126
127
@@ -138,7 +139,7 @@ fn is_within_speed_limits(current: Vec3, proposed: Vec3) -> anyhow::Result<()> {
138
139
Ok ( ( ) )
139
140
}
140
141
141
- fn has_collision ( position : & Vec3 , size : EntitySize , blocks : & Blocks ) -> bool {
142
+ fn has_block_collision ( position : & Vec3 , size : EntitySize , blocks : & Blocks ) -> bool {
142
143
use std:: ops:: ControlFlow ;
143
144
144
145
let ( min, max) = block_bounds ( * position, size) ;
@@ -421,7 +422,7 @@ pub fn player_interact_block(
421
422
422
423
// todo(hack): technically players can do some crazy position stuff to abuse this probably
423
424
// let player_aabb = query.position.bounding.shrink(0.01);
424
- let player_aabb = aabb ( * * query. position , * query. size ) . shrink ( 0.01 ) ;
425
+ let player_aabb = aabb ( * * query. position , * query. size ) ;
425
426
426
427
let collides_player = block_state
427
428
. collision_shapes ( )
0 commit comments