- Edited
Hello
I have a very simple Player scene that tries to instance a bullet node in-code and make it move horizontally. Here are the Player functions:
func _ready():
shoot_bullet()
func shoot_bullet():
var bullet = Bullet.instance()
bullet.position = position
bullet.set_direction(1)
add_child(bullet)
And here is the bullet code.
func _process(delta):
position.x += SPEED * delta * direction
While the bullet does instantiate (printing its position shows the correct coordinates), it somehow does not appear in the test window. I've set visible, show() etc. correctly so I'm unable to figure out why - can someone help?