-
-
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 Debug -> Visible Markers option #5533
Comments
This makes me think that a enhancement on top of this would be "Visible Origin", for 2D and 3D both. Which simply draws a point of the origin of every node in the tree. At the same time, this can in 2D already be achieved with a custom class. You only have to set this up once.
3D is a tiny bit more complicated, and there'd possibly be an actual performance impact drawing a bunch of circles. Heck, while we're at it. "Draw Bounding Boxes" |
It may sound good, but in practice it would be such a mess of draws, that it would be incredibly difficult to discern what Marker belongs to what. I feel like the proposal is much better, as it allows you to choose what to see by just adding the Markers as children of the interested Nodes. |
Yes, it could be a mess. Just like wireframe view is a mess. But it's still useful. And something I frequently find, as an avid speedrunner and glitch hunter, in other games when exploring their debugging functionality. Also with how Godot nodes are often used, I think it'd be a lot less of a mess than you think. Any given game object or construct might consist of a dozen nodes, but they're all in the same spot. |
As a quick test, I implemented the idea @TheDuriel mentioned about making all node origins visible. I did this with a quick copy/paste of the This is an example from a relatively simple scene without many visible nodes: This is an example from a more complex scene with more visible nodes: I like this effect in the first example as there isn't much noise, and it nicely shows the node positions, but I see how it can get quite noisy when many nodes are on the screen at once. This tends to make me favor the original approach using An additional benefit of using Marker nodes is that it would combine well with other potential efforts to improve Markers (#1009). |
I would like to add that, yeah the Position2D marker is a huge mess. And I was more thinking of a much smaller dot/square. I don't imagine that'd be nearly as problematic as this. Given that the 2D editor already implements a subdued very small white cross. |
It shouldn't be too difficult to improve Marker2D/3D's looks. And perhaps someday these Nodes could have some features added to them that specialise in debugging, easy visualization and modification without needing extensions. |
I had the same idea. With this option,
Looks good.
Yes, I think this option should be shared between 2D and 3D, this is consistent with the rest of the debug hints. |
I just wanted to add that I did end up making a proof of concept implementation of the idea of a marker with more features that was visible during game execution. |
Just putting in my two cents; I have to wonder what the purpose of the |
Describe the project you are working on
Current project is a 2D pixel-perfect platformer.
Describe the problem or limitation you are having in your project
I often lose track of where sprites are anchored. Though their general screen position is obvious, their precise positions and anchors are difficult to locate. The current solutions are:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
By making
Marker2D
nodes visible via the Debug menu, I can use the "Change Type" option on aNode2D
node to get insight into its position at runtime. If the anchor node is not aNode2D
node then I can just add aMarker2D
as a direct child of the scene's root node.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
A "Visible Markers" option will be added to the debug menu.
When running a scene that contains a
Marker2D
orMarker3D
node, that marker will be visible at runtime.I have a reference implementation of this feature for
Marker2D
nodes. I can extend it toMarker3D
and submit a pull request if this proposal is accepted.If this enhancement will not be used often, can it be worked around with a few lines of script?
This will be used often.
Is there a reason why this should be core and not an add-on in the asset library?
I am unsure how to implement this behavior (affecting the visibility of Marker nodes at runtime) as an add-on.
The text was updated successfully, but these errors were encountered: