started work on clouds

This commit is contained in:
Derek
2025-03-31 22:31:59 -05:00
parent 3346da1ed7
commit 8999a68854
74 changed files with 918 additions and 40 deletions

22
scripts/cloudSpawner.gd Normal file
View File

@@ -0,0 +1,22 @@
extends CSGBox3D
@export var number_of_clouds : int = 50
@export var cloud = preload("res://cloud1.tscn")
func _ready() -> void:
spawn_clouds()
func spawn_clouds():
print("SPAWNING CLOUDS")
while number_of_clouds >= 0:
number_of_clouds -= 1
var x : float = randf_range(size.x / 2, -size.x /2)
var y : float = randf_range(size.y/ 2, -size.y /2)
var z : float = randf_range(size.z / 2, -size.z /2)
var spawn_pos = Vector3(x,y,z)
var cloud = cloud.instantiate()
add_child(cloud)
cloud.global_position = self.global_position + spawn_pos
print("CLOUD POS : ",spawn_pos)

View File

@@ -0,0 +1 @@
uid://1q8lyvac5gft

View File

@@ -0,0 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://c0vc26f4warsi"]
[ext_resource type="Script" uid="uid://1q8lyvac5gft" path="res://scripts/cloudSpawner.gd" id="1_4fk3q"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hthjk"]
transparency = 1
shading_mode = 0
albedo_color = Color(1, 1, 1, 0)
[node name="CSGBox3D" type="CSGBox3D"]
material = SubResource("StandardMaterial3D_hthjk")
script = ExtResource("1_4fk3q")