coord-rs
coord-rs copied to clipboard
add a map_vector method to iterate 2 vectors at once
if res.correction.x != 0.0 {
entity.vel_mut().x = 0.0;
}
if res.correction.y != 0.0 {
entity.vel_mut().y = 0.0;
}
if res.correction.z != 0.0 {
entity.vel_mut().z = 0.0;
}
if velocity.x.abs() / half_chunk_scale.x > speed_step_cnt {
speed_step_cnt = velocity.x.abs() / half_chunk_scale.x;
}
if velocity.y.abs() / half_chunk_scale.y > speed_step_cnt {
speed_step_cnt = velocity.y.abs() / half_chunk_scale.y;
}
if velocity.z.abs() / half_chunk_scale.z > speed_step_cnt {
speed_step_cnt = velocity.z.abs() / half_chunk_scale.z;
}