Godot Version
4.2 Mono (C#)
Question
[ExportGroup("Bow Settings")]
[Export]
private AnimatedSprite2D BowSprite;
[Export]
private PackedScene Arrow;
private void Shoot()
{
Node NewArrow = Arrow.Instantiate();
NewArrow.Position = GlobalPosition; // NewArrow dont have a Position
ParentIsWorld.AddChild(NewArrow);
}
I tried this method, however it doesn’t work I think due to the fact that initially when instantiating the scene, the arrow is of type Node (even if I name it dynamically var, nothing changes). Saw similar code on GDScript and it worked.