Skip to content

putTileAt into createBlankLayer on hex map from Tiled renders wrong #6074

Closed
@wwoods

Description

@wwoods

Version

  • Phaser Version: 3.60.0-beta.4
  • Operating system: Pop! OS
  • Browser: Chrome

Description

See below image; base map is colored hex squares. If I dynamically add a layer via createBlankLayer, and then use putTileAt to populate this layer, the result is off-centered rendering of the tiles in the blank layer:

image

Example Test Code

// Preload
this.load.image('tiles', assetHexMini);
this.load.tilemapTiledJSON('map', assetHexMap);

// Create
const map = this.make.tilemap({key: 'map'});
const tileset = map.addTilesetImage('hexmini-6x', 'tiles');
const platforms = map.createLayer('Ground', tileset);

// Now, as a UI layer, circle two tiles using tile ID 2
const uiLayer = map.createBlankLayer('beep', tileset);
uiLayer.putTileAt(2, 2, 2);
uiLayer.putTileAt(2, 3, 2);

The map:
hexagonal-mini-6x.json.tar.gz

The tileset image:
hexmini-6x

Additional Information

This issue was worse with 3.55; I found some bugs which were fixed regarding putTileAt, hence tried the 3.60 beta.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions