occlusion part 2
This commit is contained in:
+5
-4
@@ -6,7 +6,8 @@ use bevy::prelude::*;
|
||||
use noise::{NoiseFn, Perlin};
|
||||
use rand::prelude::*;
|
||||
|
||||
pub const Z_INDEX: f32 = 0.;
|
||||
#[derive(Resource)]
|
||||
pub struct ZIndex(pub f32);
|
||||
|
||||
pub fn setup_level(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
setup_tilemap(&mut commands, &asset_server);
|
||||
@@ -26,9 +27,9 @@ pub fn setup_level(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
fn setup_tilemap(commands: &mut Commands, asset_server: &Res<AssetServer>) {
|
||||
let perlin = Perlin::new(0);
|
||||
|
||||
for x in -15..15 {
|
||||
for y in -15..15 {
|
||||
for z in -2..15 {
|
||||
for x in -50..50 {
|
||||
for y in -50..50 {
|
||||
for z in -5..40 {
|
||||
let position = Vec3::new(x as f32 * TILE_SIZE, y as f32 * TILE_SIZE, -z as f32);
|
||||
|
||||
// Generate Perlin noise value
|
||||
|
||||
Reference in New Issue
Block a user