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

Add a snapping grid to polygon editors in the TileSet editor #5847

Closed
nix365 opened this issue Nov 25, 2022 · 8 comments · Fixed by godotengine/godot#70488
Closed

Add a snapping grid to polygon editors in the TileSet editor #5847

nix365 opened this issue Nov 25, 2022 · 8 comments · Fixed by godotengine/godot#70488

Comments

@nix365
Copy link

nix365 commented Nov 25, 2022

Describe the project you are working on

2D game with a tile map

Describe the problem or limitation you are having in your project

In comparison to Godot 3 adding proper collisions to a tile map is tedious

In godot 3 by changing the steps in "Snap Options" it was possible to quickly add collisions in a smaller grid
image

Now in godot 4 it's no longer possible to change the snap options to quickly add collisions
image

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

Add the old snap options from Godot 3

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

It will work like in Godot 3 by setting the step size different to the tile size

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

No

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

It is a good feature that was already in Godot 3 and should be available in Godot 4

@KoBeWi
Copy link
Member

KoBeWi commented Nov 25, 2022

You can add one shape and copy it to other tiles, mirroring and rotating as needed.

@nix365
Copy link
Author

nix365 commented Nov 25, 2022

Thank you for your response, I already did try it with mirroring the shape. But as you can see, I don't get it lined up correctly. With no clear line to orientate getting the corners collision line up is not as easy as with the old step size. As an alternative a sub grid in the "Painting" area to easily draw the shape could help here.

@dalexeev
Copy link
Member

@Calinou Calinou changed the title Snap Options in TileSets in Godot 4 Add a snapping grid to polygon editors in the TileSet editor Feb 14, 2023
@Calinou Calinou added this to the 4.x milestone Feb 14, 2023
@ygypt
Copy link

ygypt commented Feb 14, 2023

Is it foreseeable that this feature make it into 4.0? In what will likely be Godot's largest launch, bringing many new devs from other engines, the lack of snapping collisions will be a major pain point for anyone looking to work on tiling textures larger than 32x32. The issue becomes far more evident when you attempt to move_and_slide() along a tilemap with even slightly off-balanced collisions. As it stands the tilemap feature is seemingly unusable outside of pixel art unless you very meticulously alter each and every pixel until everything lines up. (which I did and it took me over an hour)

@Zireael07
Copy link

@ygypt It was just added to 4.x milestone, not 4.0, which means it won't go into 4.0

@Calinou
Copy link
Member

Calinou commented Feb 14, 2023

4.0 is currently in RC stage, which means no new features can be added to it. Future feature development will have to wait for 4.1 at the earliest.

There's a pull request implementing this – you could compile a custom editor build with the PR locally merged if you really need the feature right now. Since this is editor-only functionality, you don't need to recompile export templates to benefit from this.

@dalexeev
Copy link
Member

As a temporary workaround, you can change the numbers in the scene file (make sure the editor is closed and you have backups).

@nklbdev
Copy link

nklbdev commented Feb 25, 2023

Wow! Great!
Maybe my small plugin can also help you on it

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