Skip to content
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

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

Open
xklse opened this issue May 29, 2024 · 10 comments
Open

Comments

@xklse
Copy link

xklse commented May 29, 2024

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

@blackears
Copy link
Owner

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
Copy link
Owner

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

@xklse
Copy link
Author

xklse commented May 30, 2024

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.

@hayahane
Copy link

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.

@blackears
Copy link
Owner

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.

@hayahane
Copy link

hayahane commented Jun 3, 2024

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

2024-06-03.224208.mp4

@blackears
Copy link
Owner

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.

@hayahane
Copy link

hayahane commented Jun 7, 2024

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

@blackears
Copy link
Owner

I have something else planned.

@hayahane
Copy link

hayahane commented Jun 7, 2024

I have something else planned.

Great, looking forward to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants