Jump to content

Tilemap sprites have weird spacing.


Recommended Posts

At initialization I iterate over the tilemap and add the sprites accordingly:

for y {
	for x {
		var sprite = new PIXI.Sprite(new PIXI.Texture(PIXI.Loader.shared.resources["assets/tileset1.png"].texture, new PIXI.Rectangle(tile % 32 * size, tile / 32 * size, size, size)));
		sprite.position.set(x * size, y * size);

However it results in these weird artifacts (in attachment). There's space between the tiles on the Y axis (and these are not in the tileset).



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...