Skip to content

Commit

Permalink
Merge pull request #3 from peabnuts123/do-not-merge-different-sized-c…
Browse files Browse the repository at this point in the history
…olliders

Do not merge concentric colliders with different widths
  • Loading branch information
popcar2 authored Jul 21, 2024
2 parents 921f20d + 665d29c commit 3a750b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TilemapCollisionBaker.gd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func run_code(_fake_bool = null):
continue

var tile_y_distance = abs(temp_collider.position.y - last_collider_pos.y) / tile_size.y
if last_collider_pos.x == temp_collider.position.x and tile_y_distance == 1:
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:
#print("Adding 1 to the merge")
colliders_to_merge += 1
last_collider_pos = temp_collider.position
Expand Down

0 comments on commit 3a750b7

Please sign in to comment.