It depends. Both the parent and child you are adding need to inherit from Node2D if it's a 2D scene you're working on, or Node3D if it's a 3D scene you're working on. To make it simple, all the "blue" nodes inherit from Node2D, and all the "red" nodes inherit from Node3D...That's the very simple and somewhat incomplete explanation.
#when i do .add_child() shouldnt it follow the parent
4 messages · Page 1 of 1 (latest)
so there both under the same parent when i goto the remote mode when i run it the camera3d dosent move at all and stays as the child of node3D
https://docs.godotengine.org/en/4.1/getting_started/first_3d_game/03.player_movement_code.html#adding-a-camera This page will help you more than I can with 3D cameras. I didn't know a camera was involved here. There is more to working with cameras than just what I explained above.
Godot Engine documentation
It's time to code! We're going to use the input actions we created in the last part to move the character. Right-click the Player node and select Attach Script to add a new script to it. In the pop...
In this page they are halfway through an example project, but I figured it'd be more useful in your situation.
However, here's the class reference doc: https://docs.godotengine.org/en/4.1/classes/class_camera3d.html It might not help illuminate this particular issue, but it is a good habit to refer to these. There's often a helpful method in a class like Camera that can point you in the right direction.
Godot Engine documentation
Inherits: Node3D< Node< Object Inherited By: XRCamera3D Camera node, displays from a point of view. Description: Camera3D is a special node that displays what is visible from its current location. ...