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

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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