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:
derek
2025-04-04 16:30:51 -05:00
parent 6cd06193b5
commit ce08df66e6
15 changed files with 99 additions and 76 deletions

8
scripts/csg_spawner.gd Normal file
View File

@@ -0,0 +1,8 @@
extends CSGBox3D
class_name CSGSpawner
func random_box_pos():
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)
return Vector3(x,y,z)