-
-
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
Allow moving only one side of extents-based rectangles/boxes using editor gizmos #452
Comments
For the record, this is also an issue with 3D shapes (such as GIProbe and CSG nodes). Last year, I tried to change it in CSG gizmos but failed. To behave like Control nodes, the following changes need to be done:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I just found this addon, which essentially does this: godot-extend Maybe someone who understands it (@Calinou ?) could try to implement it into godot directly. To get the addon working, you have to add the name of the node(s) you want to scale this way in the extend.gd classes array. The gizmo is 6 dots, not the usual scaling tool. It only works on 1x1x1 csg shapes, because it's only scaling the transform, not the actual size of the CSG, but it's at least a start. This is a feature I feel is almost essential for CSG. |
Leaving a comment here to say this also applies to 3D, not just 2D. |
Describe the project you are working on:
2D game.
Describe the problem or limitation you are having in your project:
I often use CollisionShape2D nodes with rectangle shapes. Their problem is that you need to place the rectangle in the middle of the object and expand the extents to match the object's size. Because the extents increase from both sides and it's not always obvious where object's center may be, it often requires trial-and-error to get done correctly, which is simply a waste of time.
Describe how this feature / enhancement will help you overcome this problem or limitation:
If I could change the rectangle's extents with handles on any side, like this is done with scaling Sprites or resizing Control nodes, it would save some time and make adding colliders more friendly.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
Describe implementation detail for your proposal (in code), if possible:
RectangleShapes2D should be edited like Control rectangles. This can be achieved by editing
extents
of RectangleShape2D andposition
of CollisionShape2D simultaneously.If this enhancement will not be used often, can it be worked around with a few lines of script?:
No, it would require a plugin.
Is there a reason why this should be core and not an add-on in the asset library?:
It's a QoL thing for collision shapes.
The text was updated successfully, but these errors were encountered: