From 522242182cc036a55d54ba180af4ad61fb3975fa Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 7 Aug 2021 11:32:23 +0200 Subject: [PATCH] Let TerraWorld apply voxel scale to the tree. Also now the tree's scale's random range is a lot smaller. --- game/modules/planets/test_planet/biomes/simple_biome.gd | 9 +++------ .../low_poly_rpg_item_collection_3/t1.gltf.import | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/game/modules/planets/test_planet/biomes/simple_biome.gd b/game/modules/planets/test_planet/biomes/simple_biome.gd index 4fabb68e..5a277e26 100644 --- a/game/modules/planets/test_planet/biomes/simple_biome.gd +++ b/game/modules/planets/test_planet/biomes/simple_biome.gd @@ -122,11 +122,8 @@ func gen_terra_chunk(chunk: TerraChunk) -> void: tr = tr.rotated(Vector3(0, 1, 0), randf() * PI) tr = tr.rotated(Vector3(1, 0, 0), randf() * 0.2 - 0.1) tr = tr.rotated(Vector3(0, 0, 1), randf() * 0.2 - 0.1) - tr = tr.scaled(Vector3(0.9 + 0.8 - randf(), 0.9 + 0.8 - randf(), 0.9 + 0.8 - randf())) - tr.origin = Vector3((x + chunk.position_x * chunk.size_x) * chunk.voxel_scale, ((val - 2) / 255.0) * chunk.world_height * chunk.voxel_scale, (z + chunk.position_z * chunk.size_z) * chunk.voxel_scale) + tr = tr.scaled(Vector3(0.9 + randf() * 0.2, 0.9 + randf() * 0.2, 0.9 + randf() * 0.2)) + tr.origin = Vector3((x + chunk.position_x * chunk.size_x), ((val - 2) / 255.0) * chunk.world_height, (z + chunk.position_z * chunk.size_z)) - chunk.voxel_world.prop_add(tr, prop_tree, false) + chunk.voxel_world.prop_add(tr, prop_tree) - - - diff --git a/game/modules/planets/test_planet/biomes/simple_biome/low_poly_rpg_item_collection_3/t1.gltf.import b/game/modules/planets/test_planet/biomes/simple_biome/low_poly_rpg_item_collection_3/t1.gltf.import index c86a4612..7bb4e242 100644 --- a/game/modules/planets/test_planet/biomes/simple_biome/low_poly_rpg_item_collection_3/t1.gltf.import +++ b/game/modules/planets/test_planet/biomes/simple_biome/low_poly_rpg_item_collection_3/t1.gltf.import @@ -16,4 +16,4 @@ optimization_type=2 collider_type=0 offset=Vector3( 0, 0, 0 ) rotation=Vector3( 0, 0, 0 ) -scale=Vector3( 3, 3, 3 ) +scale=Vector3( 1, 1, 1 )