spawning chests in csg boxes, working on making them root of scene so they aren't cleared with the scene on exit
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
extends CSGBox3D
|
||||
extends CSGSpawner
|
||||
|
||||
@export var number_of_clouds : int = 50
|
||||
@export var cloud = preload("res://cloud1.tscn")
|
||||
@@ -10,10 +10,7 @@ func spawn_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 spawn_pos = random_box_pos()
|
||||
|
||||
var cloud = cloud.instantiate()
|
||||
add_child(cloud)
|
||||
|
||||
Reference in New Issue
Block a user