.get_global_position
Asked Answered
L

3

0

Im new, like REALLY new to godot and .get_global_position isn't working no matter what I do and its driving me crazy because im trying to get the enemy to look at the player by subtracting the enemys location by the players locatation but its keeps saying something about a "null instance" please help ASAP im going insane

Levant answered 26/2, 2024 at 14:43 Comment(0)
L
0

Levant Also I'm in godot 4.1 and i did use the @onready var player = $Player

Levant answered 26/2, 2024 at 15:10 Comment(0)
H
0

Levant Post the relevant code snippet and the exact error message.

Hardily answered 26/2, 2024 at 15:28 Comment(0)
L
0

Hardily sorry I forgot to take this down i figured it out and fixed it i has everything in one scene and i didnt use .get_parent() nodes

Levant answered 26/2, 2024 at 16:34 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.