Rename chunk::dda to raycast
This commit is contained in:
parent
8bf15dc924
commit
c3b03c2723
2 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ impl Chunk {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn dda(&self, origin: Vector3<f32>, direction: Vector3<f32>) -> Option<Vector3<usize>> {
|
||||
pub fn raycast(&self, origin: Vector3<f32>, direction: Vector3<f32>) -> Option<Vector3<usize>> {
|
||||
let direction = direction.normalize();
|
||||
|
||||
let scale = Vector3::new(
|
||||
|
|
|
@ -359,7 +359,7 @@ impl State {
|
|||
let camera = &self.world_state.camera;
|
||||
let chunk = &mut self.world_state.chunk;
|
||||
|
||||
let coords = chunk.dda(camera.position.to_vec(), camera.direction());
|
||||
let coords = chunk.raycast(camera.position.to_vec(), camera.direction());
|
||||
if coords != chunk.highlighted {
|
||||
chunk.highlighted = coords;
|
||||
self.world_state.update_chunk(&self.render_queue);
|
||||
|
|
Loading…
Reference in a new issue