Godot Version
4.5
Question
I’m making a 3D first person shooter with a dynamic weapon system. This system has weapon drop objects that act as rigidbody3D objects that the player can interact with, as well as the 3D weapon nodes themselves that are added to the player when a weapon drop is interacted with. The player can also drop their weapons, which removes the weapon from the player and instantiates the assigned weapon drop. The weapons themselves use a resource that holds info for the weapon stats, including the weapon drop scene. The weapon drop just has an export variable that holds the weapon scene to be added to the player.
The problem is that the weapon drops have a PackedScene var that references the weapon that should be added to the player when interacted with, and the weapons have a PackedScene var that references the weapon drop that should be created if the weapon is dropped. This has created a recursion issue. What can I do to resolve this issue? Do I need to somehow combine these two objects so that they share the same data?