The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

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. goes over the basics of constructing a scene. 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.
--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 (272 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.