How do i make something loaded from another scene look at a different thing that was also loaded from another scene

Godot Version

4.3

Question

I followed a gdquest tutorial on making 3d enemies. My player character and enemies are in a different scenes than my game so that i can change them without going through all the levels in my gamel.

The tutorial tells me to write

@onready var player = get_node(“/root/game/player”)

to find the player node and then

head.look_at(player.global_position)

but the tutorial expects that the player character is not loaded from a different scene and is in the level.

how can i make the enemy look at the player?

Add the Player to a group and then have the Enemy look for the first object in the Player group.

2 Likes

thank you!

1 Like