-
-
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 a scene instance at cursor position when right-clicking in the 3D editor (already implemented in the 2D editor) #435
Comments
+1. I am working on a space game at a realistic scale, so you can guess stuff's placed really far from origin. |
You can favorite them, that's what I do when I need to instance a scene often. |
And have hundreds of favorites? Well, I could only favorite the scenes I need right now, but there are some scenes I need pretty much always and I'd have to favorite/unfavorite other scenes a lot. That sounds really messy. Although I never used favorites besides favorite nodes, I'll try it at least... |
Yeah, favorites get really clumsy when you have more than ten, but if you only have a few it works really great. |
Maybe we could implement a "paint mode" ? Where you could select a scene and instantiate it in one click on the viewport ? That could help in games where you have a lot of collectible to place on the screen. |
Could be useful, but we'd also need a preview of where the instance will be placed (obviously). Also I just realized this could be useful for built-in nodes, not only instances. I just had to create a Node2D and move it very long distance :I (with no other node to use reparenting trick). I'll update the OP. |
I feel like this and some sort of easy-to-use grid placing of elements, complete with a layer system, would effectively fix a lot of people's problems with TileMap/GridMap by migrating the features people expect out of those nodes to the engine as a whole. I could easily imagine having a more Tiled or GameMaker: Studio like experience of painting instances into the world in specific grid locations (toggleable versus world space) and being able to create layers of elements without having to parent them under a specific node. Editor-level node groups would go a long way towards that since you'd be able to filter by group. There's already a WIP PR for adding editor-time global groups too. Edit: I should probably convert this itself into an alternative proposal that could supercede a number of other proposals/Issues if done correctly. |
After some time of using favorites, I started to get lost in the list (17 right now). The problem is that they are really messy. There are some scenes I instance less frequently, but I still need them now and then. Also I often add something new, or add something temporarily, because I need it now and then almost not anymore. It makes it hard to sort the favorites, also it became hard to distinguish them and find the one I look for (some custom icons would be helpful there). tl;dr I just confirmed that using favorites is not a viable alternative |
I've started a paint mode plugin for 3D. I know there are existing 'scatter' plugins but I believe what people are looking for here is a simple single-object click-to-place functionality. https://github.com/mnemoli/godotplacer (There are a lot of things I would do differently if this were integrated into the engine code - for example, I'd like it to be an actual tool, but it looks like the tool set is not currently extendable via plugins.) Unity and UE4 do not come with this functionality built-in. I think it'd really give Godot a productivity edge if we did have something like this in the main engine. |
Except I already implemented it and been using it for months in a custom build: godotengine/godot#41437 |
Which stable release will this make it in?
What would be really nice is this same feature but allow to move selected
node on scene inspector to this position also 😁
…On Mon, 1 Feb 2021, 12:30 Tomek, ***@***.***> wrote:
Except I already implemented it and been using it for months in a custom
build: godotengine/godot#41437
<godotengine/godot#41437>
It proved to me to be very handy and with grid snapping enabled you can
easily instance the node exactly where you want.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#435 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCERRLKMCLNNYF5ZQDXSCDS42NH5ANCNFSM4KPJIL3A>
.
|
3.2.4 won't get new features anymore, so this won't be added until 3.2.5 at least (if 3.2 goes that far). |
Implemented for 2D with godotengine/godot#41437 EDIT: |
Another simple way to do that would be to add the scene in the active view. For example, let say you've panned the scene and that you are displaying in the editor a square starting from the coordinates X = 1000 and Y = 1000. I don't have godot right now on this PC, but I think that you can instance scenes from the file explorer in godot, and then drag and drop the scene in the active view ? It is a small workaround, but this feature is still a must have (and I see it has been developed so this is really great ! Thanks to the devs ;p ) |
@Calinou written a suggestion in the closed issue mentioned above. I think it deserves to be here:
|
I'm for having it as a keyboard shortcuts as well. |
I think this is the best place to share some code snippets for editor plugins, if you don't mind. In this code, a new node is created. Here it is just "Spatial" but i think you can add more types quite easily. If you want - we can discuss it, but for now here it is, the bare-minimum editor plugin code that allows you to create a node in a view space, with a little bonus such as raycast-check that will place the node on the hit position if it hits anything. It is written for Godot 3.5.1. and works on that one version. This is a hacky way, but worth sharing anyway.
|
Describe the project you are working on:
2D game with lots of different custom nodes.
Describe the problem or limitation you are having in your project:
I instance scenes a lot. Well, this is pretty common, lots of users asked for "scene tiles". But I don't even use TileMaps, so I instance nodes manually anyways. I even bound a shortcut to Instance Child Scene to quickly spawn scenes. My problem is that the instances all always created at the origin. You can of course drag and drop from file system at desired position, but due to sheer amount of different scenes and the way my files are organized, this is non-viable. It's much easier for me to press shortcut, fuzzy-search the scene name and press Enter. But then I need to move the node from (0, 0) to positions like (1200, 4600), which wastes my time.
Describe how this feature / enhancement will help you overcome this problem or limitation:
Would be cool if we had an option to instance a scene at the cursor position. Could be with Ctrl + Click or maybe then Selection List could be utilized (like, showing Add Instance on top of node list, dunno).
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
(actually, it would be useful to have there "Add Child node" too)
Describe implementation detail for your proposal (in code), if possible:
It's basically Instance Child Scene, but called from 2D viewport and positioning the node at cursor.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
It might be possible to replicate the node selection dialog and add a CanvasEditor plugin to do that, but I imagine it would be really cumbersome. Although if the quick open dialog was exposed to plugins... Still, that's more than few lines.
Is there a reason why this should be core and not an add-on in the asset library?:
Not sure how many people have similar problem, but I can't be the only one (;_;). And it's a probably small QoL thing using already existing functionality in a way impossible for custom plugins.
The text was updated successfully, but these errors were encountered: