I'm trying to make a Flappy Bird game, where a game manager attached to the scene node creates pipes every second. I also have a base which has a script. I've seen that using raise()
noticeably affects performance, so I'm trying to check if the base isn't at the front of the hierachy before using raise()
. How would I do this? Is there a built-in function (like get_tree().get_index_in_hierachy()
, or do I have to code it myself?
Any help would be greatly appreciated.