Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | GammerSly |
In my game meteorites should appear at different places (screen edge) which man then must avoid. now I would like to know how I could build such a script into my code (I would like to import a scene) Here is my code:
var myNode = preload("res://myNode.tscn")
func add_myNode_to_Game():
var myNode_instance = myNode .instance()
get_tree().get_root().add_child(myNode_instance)
myNode_instance.global_transform = global_transform