Jump to content

Creating RenderTexture from TileMapLayer


coltonoscopy
 Share

Recommended Posts

Hi all!

 

I've successfully created a scrolling TileMap using Phaser, but now I want to also show a minimap of the entire layer in the bottom right corner; I looked around and tried the following based on what info I could find about doing so:

minimap = game.add.renderTexture(210, 140, 'minimap');            minimap.renderXY(layer, 0, 0, true);            minimapSprite = game.add.sprite(1000, 510, minimap);            minimapSprite.bringToTop();

However, no minimap is rendering; any idea why? Thanks so much!

 

Best,

Colton

Link to comment
Share on other sites

  • 8 months later...

did you fix this? it's an old post...

 

you're not scaling it.. it might just be off screen... just because the renderTexture is small, I don't think means rendering a larger object to it will shrink it to fit.

 
have a look at my example
 
i'd like to see what you did if you got it working.
 
thanks,
J.
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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