Jump to content

World Bounds Offset Doesn't Work


megmut
 Share

Recommended Posts

I am trying to get the world bounds to move in from the edges of the screen. Take this phaser example as a demo: http://phaser.io/examples/v2/p2-physics/collide-world-bounds#gv

If on line 27, you add the code 'game.world.setBounds(50, 50, 250, 250);' You will notice that the 250x and 250y has taken affect, however the offset x and y of 50 each hasn't. At least, not to the sprite. So the tilemap moves in 50 x and y as you would expect, however the sprite still collides with the old world bounds. Why is this happening?

Please let me know if I have not been clear enough and I will get some images or write a demo to show you :)

Thanks, Nick

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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