Hello,
I’m not a native English speaker, so please forgive me if this is a little offensive or confusing.
I would like to ask what is the difference between the usage of these two players? They also complete the player’s behavior of setting coordinates in the ready phase. All I can think of is that when using a Group, you can set up an adventure team centrally. Is there anything I’m missing?Thank you.
@onready var player = $Player
func _ready():
player.global_position = start.get_spawn_pos()
var player = null
func _ready():
player = get_tree().get_first_node_in_group("player")
if player != null:
player.global_position = start.get_spawn_pos()