-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add possibility to "Create New Node" at editor cameras global transform origin #6186
Comments
While i personally understand the frustration i think this is very specific use case. In my understanding, placing the object in the camera is of equal priority of putting it anywhere else, for example, a user may want to spam the nodes near anything else. I personally create the nodes inside the camera and drag them out. Is pretty quick and easy, could this be a solution for your problem? |
That's why i suggested making a checkbox if people would like to keep creating new nodes at [0, 0, 0]
I'm sorry, but i don't really understand this part of the comment. Are you talking about your own game editor? It's fine, but i'm talking about Godot Engine editor itself, in which new nodes, no matter what, are being created at [0, 0, 0] and there are no options to override such behavior. I would like to write my own game editor, of course, but in my opinion, Godot Engine editor itself covers 99% of use-cases that i need for creation of this project, so there is no need for doing that much work when it's already done. But if you are talking about Godot Engine editor itself, i'm wondering how did you override such behavior, and i hope it's not about using tricks with tool scripts with getting editor camera, that can be broken at the next update |
I don't understand what you mean by my own editor, I use Godot. I just create the new nodes as a chlid of a node in the zone i want, which will be spawn at the position of the parent, then un parent it. |
This is not really different from making duplication of props, but gotcha. Still even in this case i'm pretty sure there is people that would like to see this feature come true, and even in your case, i think that'd be nicer to get it to global origin of the camera rather than doing reparenting all the time. It might not be crucial for your workflow, but this small addition i'm asking for can enhance possibility of this engine to support more various workflows in more comfortable way |
Creating a node at the current camera position may be confusing. Instead, it may be better to queue node creation until you click somewhere, and create the node at the clicked location (using a raycast to determine where to place the node exactly). |
I love that suggestion! I suggested the most oversimplified option, but if this is going to be implemented instead of my suggestion, that will be even better, mostly because it will replicate the way how you can create new entities at Hammer Editor where you can pick certain tool and place a new default entity. In case of Godot, if creation of node will be delayed until clicking at certain point, that's gonna be even better than in mentioned Hammer Editor because you won't have to go to properties and change entity type, instead, you get what you picked immediately at the position you picked, this is going to be insanely awesome |
I think that is a perfect solution and flexible enough. |
Duplicate of #435 |
I'm glad you suggested it earlier and really, really hope it will come true |
Describe the project you are working on
First person shooter (3D) with immersive elements that implements some Source mechanics such as "LocationProp" node, which are really helpful to add more to gameplay and visuals of the game, and, of course, which are used quite often. Godot 3.5.1.
Describe the problem or limitation you are having in your project
Whenever i create a new node using "Create New Node" window (that can be opened by using Ctrl + A or by pressing "+" button), it's created at [0, 0, 0] which is making development quite harder. Each time i create a node (NPCSpawn, LocationProp, LocationSound, etc), i have to move my editor camera at [0, 0, 0] to drag this node to place i need.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
If i'll be able to get nodes at cameras position, that can drastically increase my development speed in cases when i use these nodes, and, trust me, i have to use them a lot.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Probably a checkbox at "Create New Node", named "Create at camera origin"
In code... if node supports
global_transform
property...node.global_transform.origin = editor_camera.global_transform.origin
I don't really know how it works inside, but i really wish to make it use editor camera of first perspective viewport.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Sadly i can't make it on my own. If i could get access to editor cameras, i'd try to implement it on my own. Currently it is possible to get access to editor cameras, but in quite tricky, hacky ways (which can be broken at next update). I understand that editor API changes can be hard, so i ask you to make this specific function i wanted to make on my own with a hope it's easier to make for you.
Is there a reason why this should be core and not an add-on in the asset library?
As i said earlier, there is no way to get access to editor cameras in normal meaning of this word. Otherwise, it could be pretty much possible. Additionally i think that if such functionality will be implemented in the engine itself (without any need to search for addons) it can make the life of users more comfortable, if they have such case as mine.
The text was updated successfully, but these errors were encountered: