godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.11k stars 69 forks source link

Allow editing GPUParticles2D visibility rect with handles #10159

Open Arnklit opened 1 month ago

Arnklit commented 1 month ago

Describe the project you are working on

A game in production

Describe the problem or limitation you are having in your project

Editing the visibility rect through the field input is cumbersome

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add gizmo handles to the visibility rect.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Similar to other 2D rect controls, such as CollisionShape -> RectangleShape2D.

I do think it might make sense to be able to toggle the handles in the "Visibility Rect" section. Especially since I think we will eventually be getting handles for the emission shapes and it might be cluttered to display both at once.

image

If this enhancement will not be used often, can it be worked around with a few lines of script?

It would be used often

Is there a reason why this should be core and not an add-on in the asset library?

This is about improving the editor experience out of the box

mihe commented 1 month ago

Given that this would be an editor gizmo, it might make more sense to have this be a toggle up in the viewport toolbar (where things like "Generate Visibility Rect" is found currently) rather than being a property on the GPUParticles2D themselves.

Calinou commented 1 month ago

Given this comment on GPUParticles3D AABB, I'm not sure adding handles in 2D would be a good idea. We should really push users towards generating the rect/AABB more as it's more convenient and reduces cognitive load. (There are many ways we can improve this generation, e.g. by making it faster.)