mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 19:12:24 -05:00
Fix incorrect grid snapping in TileSet editor with separation
This commit is contained in:
parent
89560c2138
commit
07fdd2c702
1 changed files with 2 additions and 2 deletions
|
@ -2487,14 +2487,14 @@ void TileSetEditor::update_edited_region(const Vector2 &end_point) {
|
|||
grid_coord *= (snap_step + snap_separation);
|
||||
grid_coord += snap_offset;
|
||||
edited_region.expand_to(grid_coord);
|
||||
grid_coord += snap_step + snap_separation;
|
||||
grid_coord += snap_step;
|
||||
edited_region.expand_to(grid_coord);
|
||||
|
||||
grid_coord = ((end_point - snap_offset) / (snap_step + snap_separation)).floor();
|
||||
grid_coord *= (snap_step + snap_separation);
|
||||
grid_coord += snap_offset;
|
||||
edited_region.expand_to(grid_coord);
|
||||
grid_coord += snap_step + snap_separation;
|
||||
grid_coord += snap_step;
|
||||
edited_region.expand_to(grid_coord);
|
||||
} else {
|
||||
edited_region.expand_to(end_point);
|
||||
|
|
Loading…
Add table
Reference in a new issue