Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | jhale |
if Input.is_action_just_pressed("ui_down"):
var spear = SPEAR.instance()
get_parent().add_child(spear)
spear.position = $Position2D.global_position
The code worked until I added the position line. Can anyone tell me why this has happened?
Is there an error-message?
Is Position2D a child of the node with this script?
whiteshampoo | 2020-06-24 19:27
Yes it is a child of the node with this script. There is no error message when I try and shoot.
jhale | 2020-06-24 23:13