Open golddotasksquestions opened 1 year ago
Related to https://github.com/godotengine/godot-proposals/issues/5800. I share the same concern as in that other proposal with regards to behavior suddenly changing when you export the project.
I share the same concern as in that other proposal with regards to behavior suddenly changing when you export the project.
I don't share this concern at all because this action takes place only when running the editor. So when you press this button or F6 while the Editor is running
So the way I see it it has nothing to do with an exported project.
We should probably have a warning in the console when running a 3D project with no camera. I don't think adding an automagic camera is a good idea, i believe it will cause more confusion later on.
We should probably have a warning in the console when running a 3D project with no camera.
This is more about running individual scenes for testing purposes and having to define a camera for them to be usable, which is also an issue in 2D (in 3.x as well). Though I guess in 2D we can at least see something. Wonder if we could have a clever viewport trick when running scenes so that it has an internal camera which focuses on the object in the tested scene.
This is more about running individual scenes for testing purposes
Could apply to any scenetree with 3D nodes and no camera
I think this would be a nice QOL improvement for testing individual 3D scenes.
To address the concerns of beginners not realizing that they're missing a camera for exports, a couple of things can be done:
The way I see it, this makes testing individual scenes way easier with no downsides. It even helpfully warns beginners that they need a camera in their scene.
Maybe we can reuse the "Project Camera Override" feature.
For example, when running individual 3D scenes and there's no camera defined, auto check the "Project Camera Override" button.
For anyone that's interested, I've made a plugin that does this: https://github.com/GalanCM/godot-test-camera-3d. It's still early, but depending on interest I could look into porting it to the engine proper.
Describe the project you are working on
This applies to any Godot 3D project.
Describe the problem or limitation you are having in your project
Unlike 2D scenes, 3D scenes in Godot require to user to add a Camera. If the user does not add a Camera and tries to run a 3D scene with a 3D root node, all they see is grey.
This is because Godot will then by default render the 2D portion of the scene. When the scene does not have any 2D nodes however, Godot will just render the default 2D background, which by default is grey:
If I try to run this scene
(Godot3.X):
(Godot4 Beta5):
All I see is the grey default 2D CanvasItem environment background:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
If the root node inherits in from Node3D and there is no Camera3D in the scene, add one with the same transforms as the Editor Viewport Camera whenever the user plays the scene or hits F6.
This is the same as adding a Camera3D node and pressing Ctrl+Alt+M while the Camera3D node is selected before running the game.
Having this feature would provide the same usability and convenience Godot has when working with 2D scenes.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
See above
If this enhancement will not be used often, can it be worked around with a few lines of script?
Workarounds and custom utility are the opposite of helping with convenience and usability for commonly used features such as this.
Is there a reason why this should be core and not an add-on in the asset library?
It would make the workflow experience, convenience and therefore usability of 2D and 3D much more similar if this would work out of the box.