level.gd 270 B

123456789
  1. extends Node3D
  2. # Random spawn of Rigidbody cubes.
  3. func _on_SpawnTimer_timeout():
  4. var new_rb = preload("res://cube_rigidbody.tscn").instantiate()
  5. new_rb.position.y = 15
  6. new_rb.position.x = randf_range(-5, 5)
  7. new_rb.position.z = randf_range(-5, 5)
  8. add_child(new_rb)