Skip to content

tilemap.copy() Bug #6188

@Arkyris

Description

@Arkyris

Version

  • Phaser Version: 3.55.2
  • Operating system: Windows 10
  • Browser: N/A

Description

When trying to copy more then half the map tilemap.copy() does not work as expected. It works in one direction but not the other.
If the map is 5x5 and you want to move columns 2-5 to the left one it works fine. If you want to move columns 1-4 to the right one it just replicates column 1 over and over.
This happens when you pass the half way point on a map. So on an 11x11 moving tiles 1-5 to over to column 6 works perfectly fine. Moving columns 1-6 over to column 5 is when it starts to mess up.

Example Test Code

on an 11x11 map
this.tmap.copy(0, 0, 5, 25, 6, 0);
works.

this.tmap.copy(0, 0, 6, 25, 5, 0);
where issues begin

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions