[unknown]
I think I have already replaced rpg_7's root node 'projectile.tscn' from StaticBody3D to Node3D to avoid potential conflicts, I will double-check if its type is changed 'Node3D'.
The rpg_7 is a child node of projectile.tscn, I have projectile as packed scene in player2.tscn, and instantiate projectile.tscn in 'shoot' function:
@export var _projectile_scene : PackedScene
func shoot():
var projectiles_node : Node = $"../Projectiles"
for i in range(0, 20):
var proj_inst = _projectile_scene.instantiate()
blahblah...
So I assume projectile's child nodes got instantiated too when projectile packedscene node got instantiated, though I am not 100% sure about godot's hierarchiral instantiating behaviors.
Your project is a bit messy. You're not actually instantiating rpg_7.tscn as you described earlier but some scene that's embedded in player2.tscn and has a StaticBody3D as a root node and rgp_7.tscn as its child. This may or may not contribute to the problem.
Thanks for the insight. I will move them to input function, and stick to one input event to handle all input events.
Anyway, never instantiate new physics objects including areas from _physics_process(). So don't call shoot() from there, call it from _input() instead.
Also don't mix _input() event handler and Input object queries for handling input. It's confusing and non-elegant. Use one or the other.
P.S:Moving the input and shoot functions from 'physics_process' to 'process' seemed to fix the problem. Any testing is appreciated.