Godot-proposals: Add a "Add Camera from view" button and shortcut in the 3D editor

Created on 9 Nov 2020  路  10Comments  路  Source: godotengine/godot-proposals

Describe the project you are working on:
I need this in every 3D prototype, even the simplest scenes.

Describe the problem or limitation you are having in your project:
Adding a new camera is always incredibly tedious.
When working on my project, I live in the perspective view 99% of the time. I import and arrange assets and when it finally comes to saving the scene I want to add a camera. Currently this means pointless clicks through menus, dragging the camera from it's zero position, rotating it around until it finally is close to the perfect location I had in my perspective view already.
I am frustrated and annoyed by this because I have to repeat this mindless task with every scene again and again, when there is a camera (perspective view) at the exact location and rotation I want already.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
A single click instead of repeatedly wasting minutes of clicking and dragging to approximate what was already there.
This would also make it a million times easier to place cameras for cutscenes, and 3D in 2D viewports.
add_camera

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Just like in Maya I would really wish for a button and a shortcut that immediately adds a 3D Camera to the scene (to the last known scene tree position), at the precise translation and rotation of my perspective view.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
I would not know how. Even it is was possible, it's a much needed usability feature, I think anyone needs to have at their fingertips when they use the 3D editor.

Is there a reason why this should be core and not an add-on in the asset library?:
It's not a usability improvement if it is behind the barrier of an optional download.

editor

Most helpful comment

This can already be done with the following steps:

  • Add a camera (Ctrl + A, type "camera" then press Enter).
  • Ensure the focus is on the 3D viewport by hovering the mouse on it. You should see a gray outline appearing around the 3D viewport.
  • Press Ctrl + Alt + M to align the selected node's transform with the 3D viewport camera. This option is also available in the Perspective menu at the top-left corner of the 3D viewport.

Since this isn't something you need to do very often, I don't think we need to add a dedicated button for it.

All 10 comments

This can already be done with the following steps:

  • Add a camera (Ctrl + A, type "camera" then press Enter).
  • Ensure the focus is on the 3D viewport by hovering the mouse on it. You should see a gray outline appearing around the 3D viewport.
  • Press Ctrl + Alt + M to align the selected node's transform with the 3D viewport camera. This option is also available in the Perspective menu at the top-left corner of the 3D viewport.

Since this isn't something you need to do very often, I don't think we need to add a dedicated button for it.

This is about usability. I don't manage to do this even with your explanation.

@golddotasksquestions Apologies, it's Ctrl + Alt + M, not Ctrl + Shift + M. I edited my comment accordingly.

Thank you, that works and is a super useful shortcut, but not exactly beginner friendly or transparent feature.

How about spawing the camera already with the perspective Transform when using Add Child Node (Ctrl+A)?
It's much easier and beginner friendly to go to the Transform Inspector and hit the "default" symbol than go through lengthy online searches and learn about the Ctrl + Alt+ Mshortcut.
Plus, I literally can't think of a single occasion I ever need the camera at Vector3(0,0,0) with 0 rotation. Whereas in 99% of the usecases I want it exactly with my Perspective view Transforms or somewhere close.

Btw, I imediately changed Ctrl + Alt+ M to Ctrl + F, since even with my giant hands this is quite an impossible combination to hit onehanded. Maybe worth considering changing this, as it is really useful for all kinds of situations, not just for cameras.

How about spawing the camera already with the perspective Transform when using Add Child Node (Ctrl+A)?

This could be confusing if you're adding a camera as a child node of a player character or something like that.

Why would this be confusing? It would be exactly what I want and expect. The only exception might be when you want to add the player camera for a first person game, but then all you need to do is to hit the two "restore defaults" icons next to the Translation properties.
How to reset a property is very basic knowledge. How to learn about Ctrl + Alt + M is not. Just finding the shortcut menu is not easy to miss. Not to mention how would the user then know what shortcut to look for ... I have been annoyed with placing a camera in Godot ever since I first opened a 3D scene and I only today thanks to you pointing it out I learned about it. You better believe, I was looking everywhere for this.

My issue with this is that we're creating "exceptional" behavior by positioning Cameras differently from all other 3D nodes on creation. If we change this just for Camera nodes and not any other 3D nodes, this might end up surprising the user. (It definitely wouldn't be a good idea to do this for all 3D nodes, though.)

Yes, I understand what you are saying with "exceptional" behavior. However spawning a camera at 0,0,0 is "never needed" behavior. Hence the proposal for the button which would be a solution to all those problems: Consistent default behavior, yet obvious and userfriendly, intuitive, single click UI button - instead of many clicks with an obscure shortcut.

A camera at 0,0,0 might be a "never used" case, but it's also a neutral/reference starting position.
This looks more like a personal preference than a QOL feature.
Also, such a button seems really easy to implement in a few lines with an addon.

Also, such a button seems really easy to implement in a few lines with an addon.

I made a plugin that implements this proposal:
camera_adder.zip

It's not a usability improvement if it is behind the barrier of an optional download.

I disagree. I use a lot of QOL addons and it's really easy to add them to a project if you already have the plugin downloaded somewhere.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WizzardMaker picture WizzardMaker  路  3Comments

SpyrexDE picture SpyrexDE  路  3Comments

KoBeWi picture KoBeWi  路  3Comments

regakakobigman picture regakakobigman  路  3Comments

sprite-1 picture sprite-1  路  3Comments