Skip to content

Commit 3a750b7

Browse files
authored
Merge pull request #3 from peabnuts123/do-not-merge-different-sized-colliders
Do not merge concentric colliders with different widths
2 parents 921f20d + 665d29c commit 3a750b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TilemapCollisionBaker.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func run_code(_fake_bool = null):
112112
continue
113113

114114
var tile_y_distance = abs(temp_collider.position.y - last_collider_pos.y) / tile_size.y
115-
if last_collider_pos.x == temp_collider.position.x and tile_y_distance == 1:
115+
if last_collider_pos.x == temp_collider.position.x and tile_y_distance == 1 and temp_collider.shape.size.x == last_collider.shape.size.x:
116116
#print("Adding 1 to the merge")
117117
colliders_to_merge += 1
118118
last_collider_pos = temp_collider.position

0 commit comments

Comments
 (0)