Jump to content

Creating a rect out of camera isnt showing!


beuleal
 Share

Recommended Posts

Hey!
 
Im getting an issue when i want to create a rect out of my camera! Its not showed!
Lets see the code (Ps.: I did a clean): 
 
 
var wMap = 1000var hMap = 1000var px = 900var py = 900var h = 568;var w = 320;var game = new Phaser.Game(w, h, Phaser.CANVAS, 'game');land = game.add.tileSprite(0, 0, wMap, hMap, 'space');game.world.setBounds(0, 0, wMap, hMap);...game.camera.follow(player);...this.bmd.rect(px, py, 15, 15, 'rgba(255, 255, 255, 1)');

 

Link to comment
Share on other sites

Need more information: what's "this.bmd"? A BitmapData object? Has it already been added to the world or a sprite or something? Is your player near that position?

 

Try sticking the camera at 0,0 and drawing the rectangle there. Do you see it?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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