cyclopsLevelBuilder icon indicating copy to clipboard operation
cyclopsLevelBuilder copied to clipboard

Unable to select blocks by clicking within the space in the editing interface

Open xklse opened this issue 1 year ago • 10 comments

I speculate this may be a common issue with plugins, where third-party nodes cannot be selected

xklse avatar May 29 '24 17:05 xklse

I have plans to redesign this, but it will be a big redesign. Unfortunately there is no easy way to fix this with the way Godot's editor handles things.

blackears avatar May 30 '24 12:05 blackears

You can select nodes in the Scene window. Once one node is selected, it will be possible to select others.

blackears avatar May 30 '24 12:05 blackears

Yes, this issue seems to occur in many nodes involving scene editing. The alternative operation you mentioned is also my current backup process. Besides that, I think the plugin functionality is very good. I look forward to seeing future improvements.

xklse avatar May 30 '24 12:05 xklse

Running into a similar problem when making custom terrain, do you know how to achieve selectable 3d nodes? At first I thought it is gizmos issue, but after reading the editor code i suspect it's a renderingserver instance issue, which returns nothing when the custom node inherits VisualInstance3D and use setbase internal.

hayahane avatar May 31 '24 09:05 hayahane

The issue is that a plugin will only accept input events when one of the objects that it manages is selected. So I can't run my selection code unless a CyclopsBlock is already selected.

blackears avatar May 31 '24 23:05 blackears

I managed to use EditorNode3DGizmoPlugin to solve my problem. I don't know if it will helpful, but I'll post it here.

Godot uses ray intersection to find a visual instance internally. Since a visual instance is not a node at most times, Godot then look up the node which is the base of that instance. After that the editor will try to get it's gizmo and do ray intersection with the collision of the gizmo. So the most important step is to update gizmo's collision_mesh/collision_segment in _redraw virtual function, that's how it a custom node can be selected.

I read some of the code of Cyclops, and it's to complicated for a short-time explore. Maybe using a more standard EditorNode3DGizmoPlugin can solve the problem? I'm not sure.

image

https://github.com/blackears/cyclopsLevelBuilder/assets/39263675/f73c4ebf-555a-4a24-9f4a-77a0990d4306

hayahane avatar Jun 03 '24 14:06 hayahane

I looked at EditorNode3DGizmoPlugin back when I started. It only gives you a small selection of handles to work with. It doesn't provide the input even options I need for the more complicated things that Cyclops does.

blackears avatar Jun 03 '24 15:06 blackears

Maybe only use this for selection? There seems to be no way to select any node without a valid gizmo attached.

hayahane avatar Jun 07 '24 05:06 hayahane

I have something else planned.

blackears avatar Jun 07 '24 05:06 blackears

I have something else planned.

Great, looking forward to it!

hayahane avatar Jun 07 '24 08:06 hayahane