Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | 2-Zons |
I thought I had this figured out but somehow I can’t seem to get it to work as I would expect.
I have a Position3D node where I want to instance a scene (bullet) at
I create a reference to the scene like this: const BULLET = preload("res://Bullet.tscn")
I then instance the scene like this: var bullet_instance = BULLET.instance()
Finally I position the instance like this: bullet_instance.global_transform = global_transform
This code is running on the Position3D node where I want to create the bullets. The code runs, but it doesn’t create any bullets that I can tell. When I look in the remote scene tree at run time no new nodes are being created.