Jump to content

Tilesprite graphic bigger than sprite


tembac
 Share

Recommended Posts

Im using Phaser 2.6.1

If I load the frame from a texture on a tileSprite it shows bigger than the graphic from the file. if I load the same frame on a regular sprite it shows the correct size. 
 


//this shows bigger than the real size from the texture file
this.backLayer01 = this.add.tileSprite(0,0, this.game.width, this.game.height, "scene1", "nubes");

//this shows to be the same size as in the texture file
this.backLayer02 = this.add.sprite(0,0, "scene1", "nubes");


2bc90500dd.jpg

On top is the sprite and bottom the tileSprite. I suppose they have to be the same size and have the same position.



I'm not doing anything to them in other parts of the code. To load the texture I'm using this code on the preloader:

this.load.atlasJSONHash("scene1", "assets/texturas/Escenario01_01.png", "assets/texturas/Escenario01_01.json");


Is this the normal behavior? How can I avoid it?

Thanks!
 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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