World 0,0 is now at the center of the node texture
This commit is contained in:
+4
-1
@@ -67,7 +67,10 @@ impl Game {
|
||||
// Get positions
|
||||
let pos = camera.get_position();
|
||||
let pos = Vector3{x: pos.x as i32, y: pos.y as i32, z: pos.z as i32};
|
||||
let chunk_pos = pos / world::chunk::SIZE as i32;
|
||||
let mut chunk_pos = pos / world::chunk::SIZE as i32;
|
||||
if pos.x < 0 { chunk_pos.x -= 1; }
|
||||
if pos.y < 0 { chunk_pos.y -= 1; }
|
||||
if pos.z < 0 { chunk_pos.z -= 1; }
|
||||
|
||||
// Block position
|
||||
if self.prev_pos == None || self.prev_pos != Some(pos) {
|
||||
|
||||
Reference in New Issue
Block a user