This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I get this strange bug and it always sets whatever node I make into child of another node. How can I stop this feature?

The bug I am facing

in Engine by (164 points)

3 Answers

+3 votes
Best answer

What you're seeing isn't a bug, but just the way scene trees work in Godot.
Each scene can only have one base node. Every node you add to that will be a child of that, or a child of one of those children.

http://docs.godotengine.org/en/stable/learning/step_by_step/scenes_and_nodes.html goes over the basics of constructing a scene.

http://docs.godotengine.org/en/stable/learning/step_by_step/instancing.html#instancing goes over how to create more complex scenes by making a "scene made out of scenes".

by (1,328 points)
selected by
0 votes

Player is the root node of your scene and you can't have multiple root nodes. If you want a different parent for your 2nd sprite create another root node and put Player and the 2nd sprite as children to that node.

by (30 points)
0 votes

If you don't want a sprite to be apart of your current scene, You'll need to make another scene. If you want them to interact, you'll need to have another scene, (AKA a level/world scene). And instance the other 2 scenes in. In short you'll be needing 3 scenes total.
world
--player (instanced in)
--otherthing (instanced in)

to instance in a scene click on the chainlink icon (it's right next to the plus symbol(the one that adds nodes into your scene))

It's how Godot's node system works. It's a good idea to look at the Godot Documentation when your stuck.

by (275 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.